Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- PHP concurrent script execution
August 26, 2005, 7:08 am
rate this thread
inserts a row into the DB, then sleeps for 30 seconds. If I try to run
the script concurrently by opening 2 browser windows, the 2nd instance
will not run until the 1st instance of the script has finished
executing (30 seconds). This is NOT what I expected.
However, if I run the script from IE, then again concurrently from
Mozilla, everything is fine! Or, if I run the script from computer A,
then load it from computer B, it runs concurrently just fine! It's
only when I'm loading the script on twice on 1 computer, using the same
internet browser, that it does not run concurrently. Does anyone have
Thanks in advance.
Re: PHP concurrent script execution
I shouldn't ask but: Why do you have a webpage sleep for 30 seconds?
It could be that your browser is the hold up, not the server. While
your script is sleeping for the 30 seconds it still has an HTTP
connection open and the browser is still waiting for a response. It's
entirely possible (even likely) that the browser will not issue
another request for the same resource until the first request