Creating pools dynamically without restart fpm?

424 views
Skip to first unread message

Strae

unread,
Jul 4, 2011, 9:49:17 AM7/4/11
to highloa...@googlegroups.com
Is this possible?

Im using fpm with nginx to build a multi-host like environment;
I have a script that create the `/etc/php5/fpm/fpm.d/$domain.conf` and the source tree, but i dont understand if is possible to tell fpm to load that pool without having to reload it (in order to avoid a downtime everytime a domain is created).

Actually, i invoke a php5-cgi process (nginx is configurated to load PHP over a socket) to serve the new domain, and once a day restart FPM (and kill all php5-cgi processes), but as you see is not a solution, but just a temporary trick.

Any idea?

Jérôme Loyet

unread,
Jul 4, 2011, 4:11:56 PM7/4/11
to highloa...@googlegroups.com
2011/7/4 Strae <daniele....@gmail.com>:
> Is this possible?

the short answer is NO.

Even a reload is killing processes. I have in mind to rethink this
part, but as it's complicated, I don't have any ETA.

Please, add a comment to https://bugs.php.net/bug.php?id=51973 as it's
a kind of similar problem.

>
> Im using fpm with nginx to build a multi-host like environment;
> I have a script that create the `/etc/php5/fpm/fpm.d/$domain.conf` and the
> source tree, but i dont understand if is possible to tell fpm to load that
> pool without having to reload it (in order to avoid a downtime everytime a
> domain is created).

There is no solution but to restart FPM at each domain creation for now.

++ Jerome

Strae

unread,
Jul 5, 2011, 8:21:08 AM7/5/11
to highloa...@googlegroups.com
Thanks jerome for the (sad) answer, i saw your name many times about fpm and i want to thank you to the big efforts youre doing to improve fpm!

Jérôme Loyet

unread,
Jul 5, 2011, 8:27:30 AM7/5/11
to highloa...@googlegroups.com
2011/7/5 Strae <daniele....@gmail.com>:

> Thanks jerome for the (sad) answer, i saw your name many times about fpm and
> i want to thank you to the big efforts youre doing to improve fpm!
>

thanks you.

I'll be working on a gracefull restart of FPM. So that, you can add a
pool or change configuration wihout downtime. All processes will be
stopped gracefully (understand the current request will finish to
serve the current request before stopping) and everything should be
transparent for users. But it's kind of big work. So don't expect it
very soon.

++ jerome

Uroš Gruber

unread,
Jul 22, 2011, 8:06:50 AM7/22/11
to highloa...@googlegroups.com
I'm glad to hear this. And also thank you Jerome for making php-fpm
more useful with every feature you implement.

regards

Uros

2011/7/5 Jérôme Loyet <m...@fatbsd.com>:

Jérôme Loyet

unread,
Jul 22, 2011, 6:31:59 PM7/22/11
to highloa...@googlegroups.com
2011/7/22 Uroš Gruber <uros....@gmail.com>:

> I'm glad to hear this. And also thank you Jerome for making php-fpm
> more useful with every feature you implement.

thx you very much, it's always great to hear greatings :)

Changli Wang

unread,
Jul 28, 2011, 11:19:11 AM7/28/11
to highloa...@googlegroups.com
According to the following post and the official document,  it seems that we can avoid downtime with "php-fpm reload" completely.
But  I get a downtime(some request faild) during reload the php-fpm in my experiment.

the post:http://groups.google.com/group/highload-php-en/browse_thread/thread/5f86daaaf6b85d26/ae23d6003ed42a2e?lnk=gst&q=graceful+reload#ae23d6003ed42a2e
offical document:http://php-fpm.org/wiki/FAQ#Why_do_I_need_to_patch_the_PHP_source_to_use_PHP-FPM.3F

I was so confused, is it real graceful?

icharlie.

Michael Shadle

unread,
Jul 28, 2011, 11:30:07 AM7/28/11
to highloa...@googlegroups.com

php-fpm.org documentation is only relevant up until 5.2.x and some of
the unofficial 5.3.x work.

now that php-fpm has been put into core, php.net would be the best
place to find information. I don't think a lot of documentation has
been generated quite yet, but it operates quite different now than it
used to. Conceptually it's mainly the same, but otherwise, it is much
more mature now, a lot of the missing features have been put in, etc.

I should really update the main page and other places on php-fpm.org
better to reflect this.

Reply all
Reply to author
Forward
0 new messages