ml01172 Posted May 10, 2007 Share Posted May 10, 2007 I might be wrong, but this is what it looks like: - I connect to the apache over a web-browser, and request a PHP script - The PHP script then connects over TCP to a daemon on the system, requesting data - The daemon does not answer with data immediately but the script has to wait instead - The script waits and waits, and I turn off the web-browser, thus (as I understand) killing the php-instance on the server - (The daemon is such that it doesn't close the runaway-sockets, i.e. when a client leaves it doesn't notice it and it doesn't close the corresponding sockets, so that might be an issue, but still.... keep reading) - I request another page from the Apache - It blocks forever. - I kill the daemon - The Apache immediately returns the page for the new request. How do you explain this behaviour? Thank you Quote Link to comment Share on other sites More sharing options...
ml01172 Posted May 14, 2007 Author Share Posted May 14, 2007 OK, nobody answered on this topic, but nobody could have - I made a wrong conclusion, and the question couldn't be answered. If anybody interested, however, this is the deal: the script waited for the daemon to answer over the socket, thus blocking in the call. BUT, what happened earlier is that I opened the session by session_start() which locked the session file. Now, another instance of the same script for the same user required this same session file to be opened, thus waiting for it to be unlocked. This never happened, however, until the daemon answered and the first instance of the script finished, automatically unlocking the session file. So, this kinda wasn't the question for Apache section, but rather for another, but I couldn't know that until I solved it. Thank you, anyway, I see there were 57 views on the topic. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.