php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #40596 Running two PHP scripts causes Apache freeze
Submitted: 2007-02-22 22:20 UTC Modified: 2007-02-22 23:15 UTC
From: karldray at interchange dot ubc dot ca Assigned:
Status: Not a bug Package: Apache2 related
PHP Version: 5.2.1 OS: Windows XP SP2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: karldray at interchange dot ubc dot ca
New email:
PHP Version: OS:

 

 [2007-02-22 22:20 UTC] karldray at interchange dot ubc dot ca
Description:
------------
While two PHP scripts (or two instances of the same script) are running, Apache (2.2.4) stops responding to any new requests (even for non-php pages) until one of them finishes.

It doesn't seem to matter what the scripts are actually doing; the same problem occurs when they're doing any of the following:

-performing calculations (e.g. counting from 1 to 10000000)
-blocking on socket functions
-sleep() ing

Reproduce code:
---------------
wait.php:
<?php sleep(15); ?>

1. Open two browser windows and point them both to wait.php so that they're running at the same time.
2. Before they finish, open a third browser window and point it to any other URI on the server (even a non-php page).


Expected result:
----------------
The third window should load immediately.

Actual result:
--------------
The third window does not load until one of the two PHP scripts finshes.

Note: If the third request is for a PHP page containing an error_log() at the very beginning, then the logfile output is not generated as long as the first two pages are running (suggesting that Apache isn't getting around to starting PHP during this time).

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-02-22 22:31 UTC] tony2001@php.net
Please make sure you have a clean system. I.e. no firewalls, no third-party applications that might affect it. It would be good if try it on another machine.
Personally I do not believe an issue like this might come unnoticed, so it looks like your local problem.
 [2007-02-22 22:36 UTC] karldray at interchange dot ubc dot ca
Bug closed: I just noticed that while the first two scripts are running, Apache still responds fine to requests coming from other clients. There must simply be a limit of two simultaneous requests per client that Apache is enforcing. Now I just need to figure out how to change this.
 [2007-02-22 22:37 UTC] fmk@php.net
I Think this is an IE problem and has nothing to do with PHP or Apache.

Try the same thing in Firefox and you will not see this problem. IE seams to have a limit of two connections to the same server at any time.
 [2007-02-22 22:45 UTC] tony2001@php.net
Not PHP problem.
 [2007-02-22 23:12 UTC] karldray at interchange dot ubc dot ca
Yeah, the limit is implemented in the browser (Firefox does it too). Here's an article on it (and how to change it):

http://www.oreillynet.com/xml/blog/2006/10/what_i_didnt_know_about_xhr.html
 [2007-02-22 23:15 UTC] karldray at interchange dot ubc dot ca
P.S. Thanks for the responses and sorry about the bogus bug. :)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri May 03 14:01:30 2024 UTC