473,387 Members | 1,569 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

PHP concurrent script execution

I'm experiencing some very weird behavior. I have a simple script that
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
any ideas??

Thanks in advance.

Aug 26 '05 #1
2 4754
Jan
It seems that you're using a Session, right?
For more informations take a look at
http://de2.php.net/manual/en/functio...rite-close.php

-
Jan

Aug 26 '05 #2
On 26 Aug 2005 00:08:35 -0700, "jw7u" <Po*******@gmail.com> wrote:
I'm experiencing some very weird behavior. I have a simple script that
inserts a row into the DB, then sleeps for 30 seconds.
I shouldn't ask but: Why do you have a webpage sleep 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.


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
completes.

Aug 27 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Boris Nikolaevich | last post by:
This is backwards of what I usually want--normally if you have a long-running ASP script, it's a good idea to check to see whether the client is still connected so you can cancel execution. ...
0
by: Mike Meyer | last post by:
The recent thread on threads caused me to reread the formal definition of SCOOP, and I noticed something I hadn't really impressed me the first time around: it's using staticly checkable rules to...
11
by: Durai | last post by:
Hi All, I tested "concurrent testing" in MySQL. It works fine. But I couldn't do in PostgreSQL 7.3.4 on HPUX IPF. I got deadlock problem. I used the PHP script to update table( one script...
0
by: Volkan Arslan | last post by:
------------------------------------------------------------- LASER Summer School on Software Engineering Software engineering for concurrent and real-time systems Elba, Italy September 11 -...
3
by: iam980 | last post by:
Hello All. We have tested following SQL script from query analyzer: -- Script begin DECLARE @I int; SET @I = 1; WHILE @I < 10000000 BEGIN SET @I = @I + 1; END -- Script end
6
by: Bill Manring | last post by:
I have an ASP.NET application which my company sells comercially. We license on a concurrent user model, but we currently rely on the "honor" system for the customers to give us their best guess...
5
MitchR
by: MitchR | last post by:
Hello to All; I have inherited a database and need to have the database post a date in a comments column which I can do. Problem is every time I execute the event procedure it replaces the old date...
3
by: =?Utf-8?B?RGFuaWVs?= | last post by:
Hi, I have a winform client which consumes a WCF service. I have a single service client(proxy) at the winform side, but spread the service calls into multiple threads so that they can do works...
1
by: mrudulav | last post by:
Hi I am using Mysql 4.0.18 and executing concurrent insert statement. I am executing this statement in the loop. For first few interation the perofrmace is quite good, the query executes in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.