atom feed8 messages in ru.sysoev.nginxRe: Simple threading question
FromSent OnAttachments
Ankur GuptaSep 26, 2010 11:04 pm 
mat hSep 26, 2010 11:16 pm 
Ankur GuptaSep 26, 2010 11:49 pm 
mat hSep 26, 2010 11:56 pm 
Igor SysoevSep 27, 2010 12:18 am 
Phillip OldhamSep 27, 2010 12:27 am 
Ian HobsonSep 27, 2010 4:59 am 
SpliticeSep 27, 2010 8:47 am 
Subject:Re: Simple threading question
From:Splitice (mat@gmail.com)
Date:Sep 27, 2010 8:47:25 am
List:ru.sysoev.nginx

Ian, nice pickup never conidered session locking.

Another soln, dont start a session on the blocking page if it is not needed.

Sent from my iPod

On 27/09/2010, at 9:59 PM, Ian Hobson <ia@ianhobson.co.uk> wrote:

On 27/09/2010 07:05, Ankur Gupta wrote:

I have a bunch of nginx and php-fpm worker threads. I am running a very simple test with a script doing: <? sleep(20); ?>. I notice that if I make two requests at the same time (from the same IP address), they get serialized on the php-fpm side and have a twenty second differential. Why would this happen and the two requests not get processed in parallel when there are an abundant number of threads?

This is a feature of PHP.

It carefully sequences the accesses so that only one thread at a time can access the session variables.

You can call session_write_close() after you have updated all your session variables, to tell php you are done with the session and it will release any waiting thread.

If nginx is serving static content, these serves will not be effected.

Regards