PHP-FPM and concurrency

Michael Shadle mike503 at gmail.com
Fri Jan 29 22:58:58 MSK 2010


Hey that was going to be my suggestion :)


Sent from my iPhone

On Jan 29, 2010, at 6:04 AM, Kiril Angov <kupokomapa at gmail.com> wrote:

> Right on! I switched to session in the database and no more  
> problems. Thank you very much for your time!
>
> Regards,
> Kiril
>
> On Jan 28, 2010, at 4:02 PM, Patrick J. Walsh wrote:
>
>> If this is PHP and you are using sessions, I would guess that your  
>> sessions are blocking.  With sessions enabled, each PHP client has  
>> a write lock on the sessions file and concurrent requests are  
>> blocked to wait for the session to be available for an exclusive  
>> lock.  As soon as you are done making changes to a session, close  
>> it for writing and other requests will be handled.  See this page  
>> for details:
>>
>> http://php.net/session_write_close
>>
>> ..Patrick
>>
>>
>>
>> On Jan 28, 2010, at 6:21 AM, Reinis Rozitis wrote:
>>
>>> Static files are most likely served instantly rather than keeping  
>>> a connection hanging for a minute (to check something different  
>>> than php you can try a perl script with just sleep(60); in it).
>>> You can also look if nginx gets the second request (if not then  
>>> its still the browser problem and not webserver) just by checking  
>>> the access and errorlog (in case there is some fastcgi backend  
>>> timeout).
>>>
>>> Of course it might be a problem with php/fpm config. How many php  
>>> childs do you spawn? Could it be possible that all childs are  
>>> taken at the moment for processing your ~1min scripts?
>>>
>>> rr
>>>
>>>
>>> ----- Original Message ----- From: "Kiril Angov" <kupokomapa at gmail.com 
>>> >
>>> To: <nginx at nginx.org>
>>> Sent: Thursday, January 28, 2010 3:00 PM
>>> Subject: Re: PHP-FPM and concurrency
>>>
>>>
>>>> Hello,
>>>>
>>>> thanks but for the reason of browser configuration, I checked to  
>>>> see if I can open other resources from the same domain from the  
>>>> same browser and it work for static files. Also, browser limits  
>>>> would be per tab or at least 6 requests per second, not really 6  
>>>> concurrent connections.
>>>>
>>>> Any other suggestions?
>>>>
>>>> On Jan 28, 2010, at 12:08 PM, Reinis Rozitis wrote:
>>>>
>>>>> It is probably more related to how many connections at max a  
>>>>> single browser instance keeps open to a single hostname.
>>>>>
>>>>> For Firefox for example usually the default value is only 2.  
>>>>> ( can search google for network.http.max-connections-per-server )
>>>>> IE has 6 at least (but seems you are not using that).
>>>>>
>>>>> Increase those and see if it helps.
>>>>>
>>>>> rr
>>>
>>>
>>> _______________________________________________
>>> nginx mailing list
>>> nginx at nginx.org
>>> http://nginx.org/mailman/listinfo/nginx
>>
>> _______________________________________________
>> nginx mailing list
>> nginx at nginx.org
>> http://nginx.org/mailman/listinfo/nginx
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list