ID: 30589 User updated by: brian dot foddy at nwa dot com Reported By: brian dot foddy at nwa dot com -Status: Open +Status: Bogus Bug Type: Performance problem Operating System: Solaris 2.8 PHP Version: 5.0.2 New Comment:
There is something more at work here, and current evidense points away from php5. Previous Comments: ------------------------------------------------------------------------ [2004-10-27 23:57:28] brian dot foddy at nwa dot com Thanks for the quick reply, but I modified the sample script to <?php session_write_close(); print ("starting1"); flush (); touch ("foo.dat"); sleep (60); ?> Done. but it has no effect. The flush call is only for demonstration/debug, my actual script where I noticed the problem doesn't have this call. The contents of php.ini Session section are (comments removed), pretty standard I believe: [Session] session.save_handler = files session.save_path = /tmp session.use_cookies = 1 session.name = PHPSESSID session.auto_start = 0 session.cookie_lifetime = 0 session.cookie_domain = session.serialize_handler = php session.gc_probability = 1 session.gc_maxlifetime = 1440 session.referer_check = session.entropy_length = 0 session.entropy_file = ; session.entropy_length = 16 ; session.entropy_file = /dev/urandom session.cache_limiter = nocache session.use_trans_sid = 1 url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry" ------------------------------------------------------------------------ [2004-10-27 23:33:57] [EMAIL PROTECTED] You're probably using session_auto_start or something. Run session_write_close() as first statement to close the session, this will allow your script to run concurrently. ------------------------------------------------------------------------ [2004-10-27 22:49:22] brian dot foddy at nwa dot com Description: ------------ Frankly I can't believe this is a bug, but I can't find any config to change this behavior... Using 5.0.2 on Solaris 2.8 and Apache 1.3.22, we are unable to have concurrent execuation of the same script at the same time. Any attempt to run the script below from 2 browsers, the first one will start normally, displaying "starting", then during the sleep, try a second request and it will not begin any execution until the first request completes, then it begins its normal execution. If this script is duplicated to a different file name, ie: concurrent1.php and concurrent2.php, then both can execute at the same time as you would expect. This server was upgraded from version 4.3x some months back and I'm sure it didn't have this behavior. In general our server is a low-volume intranet server so this problems only shows up on rare occasions when a specific web app is needed. Apache config: MinSpareServers 2 MaxSpareServers 12 StartServers 8 MaxClients 20 The web server is not reaching these limits for my tests. Reproduce code: --------------- <?php print ("starting"); flush (); touch ("foo.dat"); sleep (60); ?> Done. Execute from 2 browsers at the same time. Expected result: ---------------- Both browsers should show "starting" then wait the 60 seconds. Actual result: -------------- The first request starts normally, the second page waits for the first to complete before the second begins. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=30589&edit=1