Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

If i use the code in one script, like:

ignore_user_abort(1);
sleep(30);

And i close the page, the client stay in a timeout for 30 seconds to any page of server. I try put "Timeout 5" in the apache2.conf to close the connection of client but nothing...

  • I enter in the page: www.example.com/timeout.php ( using the code sleep(30) )
  • Close the page
  • Enter in the page: www.example.com/somebody.php ( the content just a "Hello, World" )
  • Stay loading the page... and for 30 seconds the page load.

Somebody can help? Thank.

share|improve this question
Did you restart the Apache server after making changes to the config file? You probably did, but you never know... – David Dec 3 '12 at 15:35
What do you mean with "Close the page" ? – arkascha Dec 3 '12 at 15:35
Could it be you limited the http server to only a single worker process? So that all requests are processed one after another? – arkascha Dec 3 '12 at 15:36
1  
Are you using sessions? session files are locked by the first script doing a session_start() and are not released until the script exits. try adding a session_write_close() to your sleep() script. – Marc B Dec 3 '12 at 15:37
The problem has the session, i put the function "session_write_close()" in the script and now its ok. Thank you Marc B. – user1873021 Dec 3 '12 at 16:59

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.