Welcome! Log In Create A New Profile

Advanced

PHP-FPM documentation

Posted by Renzo Racioppi 
Renzo Racioppi
PHP-FPM documentation
May 09, 2013 01:48PM
Hello all, does anybody have a documentation which describes PHP-FPM
software architecture?

I have some doubts concerning pools and master process interactions...

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Renzo Racioppi
Re: PHP-FPM documentation
May 14, 2013 05:58AM
In particular, I noticed that all process of certain pool write at their FD
3 when a request for that pool comes. ltrace clearly shows that only one
process writes an HTML page, but strace instead shows a really confused
output. I have also noticed that also PHP-FPM master process listens to the
same port of the pool, I think it does this, on order to know when spawn
dynamic process.

What I have found about PHP-FPM process interaction on the web, presents a
too high-level description, mostly oriented to web developers. FPM official
page describes only module directives. I would like instead to know how
things are really working.

Regards.

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Jérôme Loyet
Re: PHP-FPM documentation
May 14, 2013 06:04AM
Hi,

master process listens to the same port as the pool because of the spawn
dynamic process, you are right. Using epoll, it can know when a new
connexion arrives and then decides wether or not to fork a new process.

Each pool process uses several FD. Once for communicating both way with the
master process, once for logging (if I remember correctly), one for the
socket on the server side and one for the socket for the client. The number
attributated to FD is not supposed to be consistent and can vary as it's
allocated by kernel.

++ Jerome


2013/5/14 Renzo Racioppi <hellforgetm@gmail.com>

> In particular, I noticed that all process of certain pool write at their
> FD 3 when a request for that pool comes. ltrace clearly shows that only one
> process writes an HTML page, but strace instead shows a really confused
> output. I have also noticed that also PHP-FPM master process listens to the
> same port of the pool, I think it does this, on order to know when spawn
> dynamic process.
>
> What I have found about PHP-FPM process interaction on the web, presents a
> too high-level description, mostly oriented to web developers. FPM official
> page describes only module directives. I would like instead to know how
> things are really working.
>
> Regards.
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "highload-php-en" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to highload-php-en+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Antony Dovgal
Re: PHP-FPM documentation
May 14, 2013 06:08AM
On 2013-05-14 13:57, Renzo Racioppi wrote:
> In particular, I noticed that all process of certain pool write at their FD 3 when a request for that pool comes. ltrace clearly shows that only one process writes an HTML page, but strace instead shows a really confused output. I have also noticed that also PHP-FPM master process listens to the same port of the pool, I think it does this, on order to know when spawn dynamic process.
>
> What I have found about PHP-FPM process interaction on the web, presents a too high-level description, mostly oriented to web developers. FPM official page describes only module directives. I would like instead to know how things are really working.

I guess your only option is to get the sources and read them.
If you have any questions regarding some specific parts of the code, feel free to ask them here.

--
Wbr,
Antony Dovgal
---
http://pinba.org - realtime profiling for PHP

--

---
You received this message because you are subscribed to the Google Groups "highload-php-en" group.
To unsubscribe from this group and stop receiving emails from it, send an email to highload-php-en+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 90
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready