Troll
No more than 3-5 PHP processes with Nginx
September 19, 2010 10:44AM
Hello everyone,

I installed PHP-FPM on a Debian Lenny OS and configured Nginx to work
with PHP-FPM.

But there is a strange bug, and it reproduces even when trying another
installation in a VM for example : in dynamic mode (of course) the
number of PHP processes the the pool that is being benchmarked (with
ab) never increases to a number higher than 5 (and the most frequent
is 3), starting with 1 server.

Of course I've tried to increase the concurrency of the ab command,
but with higher than 130 PHP-FPM just blows up with this error :

[error] 9476#0: *516459 writev() failed (107: Transport endpoint is
not connected) while sending request to upstream, client:
192.168.0.10, server: fpm1, request: "GET / HTTP/1.0", upstream:
"fastcgi://unix:/tmp/php-fpm.sock:", host: "fpm1:81"

Without even increasing the number of PHP processes to a number higher
than the 5 ones, quoted below...

The strangest thing is that this bug appears with nginx whereas it
doesn't with Apache2...

Maybe there is a ratio between clients (nginx) / and the number of
processes ?


Thanks in advance
Troll
Re: No more than 3-5 PHP processes with Nginx
September 19, 2010 11:44AM
So, I've tested with not only 1 but 40 worker processes for nginx.

And now, PHP-FPM is reacting like with apache2 : numerous PHP
processes are created.

So is seems there is really a ratio between nginx worker processes /
and the number of PHP processes that can be used.

I've looked for an nginx directive dealing with a max_request of
anything else but I didn't find anything, maybe it's at the level of
PHP-FPM ? Would be really weird...

If anyone knows anything... I am interested in any information :)


Thanks in advance.

Troll

On 19 sep, 16:41, Troll <trollofdarkn...@gmail.com> wrote:
> Hello everyone,
>
> I installed PHP-FPM on a Debian Lenny OS and configured Nginx to work
> with PHP-FPM.
>
> But there is a strange bug, and it reproduces even when trying another
> installation in a VM for example : in dynamic mode (of course) the
> number of PHP processes the the pool that is being benchmarked (with
> ab) never increases to a number higher than 5 (and the most frequent
> is 3), starting with 1 server.
>
> Of course I've tried to increase the concurrency of the ab command,
> but with higher than 130 PHP-FPM just blows up with this error :
>
> [error] 9476#0: *516459 writev() failed (107: Transport endpoint is
> not connected) while sending request to upstream, client:
> 192.168.0.10, server: fpm1, request: "GET / HTTP/1.0", upstream:
> "fastcgi://unix:/tmp/php-fpm.sock:", host: "fpm1:81"
>
> Without even increasing the number of PHP processes to a number higher
> than the 5 ones, quoted below...
>
> The strangest thing is that this bug appears with nginx whereas it
> doesn't with Apache2...
>
> Maybe there is a ratio between clients (nginx) / and the number of
> processes ?
>
> Thanks in advance
Troll
Re: No more than 3-5 PHP processes with Nginx
September 30, 2010 12:04PM
Hi guys,

A small up to my topic, does anyone have the same issue ?

Thanks in advance

Troll

On Sep 19, 5:41 pm, Troll <trollofdarkn...@gmail.com> wrote:
> So, I've tested with not only 1 but 40 worker processes for nginx.
>
> And now, PHP-FPM is reacting like with apache2 : numerous PHP
> processes are created.
>
> So is seems there is really a ratio between nginx worker processes /
> and the number of PHP processes that can be used.
>
> I've looked for an nginx directive dealing with a max_request of
> anything else but I didn't find anything, maybe it's at the level of
> PHP-FPM ? Would be really weird...
>
> If anyone knows anything... I am interested in any information :)
>
> Thanks in advance.
>
> Troll
>
> On 19 sep, 16:41, Troll <trollofdarkn...@gmail.com> wrote:
>
>
>
> > Hello everyone,
>
> > I installed PHP-FPM on a Debian Lenny OS and configured Nginx to work
> > with PHP-FPM.
>
> > But there is a strange bug, and it reproduces even when trying another
> > installation in a VM for example : in dynamic mode (of course) the
> > number of PHP processes the the pool that is being benchmarked (with
> > ab) never increases to a number higher than 5 (and the most frequent
> > is 3), starting with 1 server.
>
> > Of course I've tried to increase the concurrency of the ab command,
> > but with higher than 130 PHP-FPM just blows up with this error :
>
> > [error] 9476#0: *516459 writev() failed (107: Transport endpoint is
> > not connected) while sending request to upstream, client:
> > 192.168.0.10, server: fpm1, request: "GET / HTTP/1.0", upstream:
> > "fastcgi://unix:/tmp/php-fpm.sock:", host: "fpm1:81"
>
> > Without even increasing the number of PHP processes to a number higher
> > than the 5 ones, quoted below...
>
> > The strangest thing is that this bug appears with nginx whereas it
> > doesn't with Apache2...
>
> > Maybe there is a ratio between clients (nginx) / and the number of
> > processes ?
>
> > Thanks in advance
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 279
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready