Welcome! Log In Create A New Profile

Advanced

Seperate restarting of a pool!?

Posted by Thomas Fritz 
Thomas Fritz
Seperate restarting of a pool!?
July 25, 2010 05:46AM
I think i can remember that i have somewhere read about that feature or
feature wish!
Is it possible to restart only a specific pool and not the whole FPM? Is it
planned to support that?

Thanks

Kind regards



---

*Thomas FRITZ*
*web* http://fritzthomas.com
*twitter* http://twitter.com/thomasf
Jérôme Loyet
Re: Seperate restarting of a pool!?
July 25, 2010 06:44AM
2010/7/25 Thomas Fritz <fritztho@gmail.com>:
> I think i can remember that i have somewhere read about that feature or
> feature wish!
> Is it possible to restart only a specific pool and not the whole FPM?

it's not possible

> Is it
> planned to support that?

not planned yet, but I'm thinking of the problem. You can see a bug
report related to this: http://bugs.php.net/bug.php?id=51973

it would be possible to restart only a specific pool but there is some
work to do, it's not that easy and I'm not sure we want to add such a
"complex" system. I'm more thinking on a global gracefull restart
which does not exist at this moment, which is a real mess to me and
which could replace the restart of one pool.

but the discution is open and every opinion, comment, notice is welcome.

++ Jerome
> Thanks
> Kind regards
>
>
>
> ---
> Thomas FRITZ
> web http://fritzthomas.com
> twitter http://twitter.com/thomasf
>
Re: Seperate restarting of a pool!?
July 26, 2010 02:12PM
I would like to know that too.

On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com> wrote:
> I think i can remember that i have somewhere read about that feature or
> feature wish!
> Is it possible to restart only a specific pool and not the whole FPM? Is it
> planned to support that?
>
> Thanks
>
> Kind regards
>
> ---
>
> *Thomas FRITZ*
> *web*http://fritzthomas.com
> *twitter*http://twitter.com/thomasf
Jérôme Loyet
Re: Seperate restarting of a pool!?
July 26, 2010 02:36PM
2010/7/26 GM <gm@gm.lv>:
> I would like to know that too.

can you describe why you want that ? what is the need ? Before coding
anything I'd like to be sure the solution is the right one.

>
> On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com> wrote:
>> I think i can remember that i have somewhere read about that feature or
>> feature wish!
>> Is it possible to restart only a specific pool and not the whole FPM? Is it
>> planned to support that?
>>
>> Thanks
>>
>> Kind regards
>>
>> ---
>>
>> *Thomas FRITZ*
>> *web*http://fritzthomas.com
>> *twitter*http://twitter.com/thomasf
>
Gints Murāns
Re: Seperate restarting of a pool!?
July 30, 2010 06:44PM
What happens with other pools when one of the pools have gateway
timeout? I mean when there is some long script running, that takes up
all the pool resources. I guess that would have to affect other pools.
So I want to restart this one, why should I those others? Especially
when there is a lot of webpages and a lot of pools.

On Jul 26, 9:35 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
> 2010/7/26 GM <g...@gm.lv>:
>
> > I would like to know that too.
>
> can you describe why you want that ? what is the need ? Before coding
> anything I'd like to be sure the solution is the right one.
>
>
>
>
>
> > On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com> wrote:
> >> I think i can remember that i have somewhere read about that feature or
> >> feature wish!
> >> Is it possible to restart only a specific pool and not the whole FPM? Is it
> >> planned to support that?
>
> >> Thanks
>
> >> Kind regards
>
> >> ---
>
> >> *Thomas FRITZ*
> >> *web*http://fritzthomas.com
> >> *twitter*http://twitter.com/thomasf
Diemuzi
Re: Seperate restarting of a pool!?
August 19, 2010 03:28PM
Changing per pool values is a big part for me. I would rather restart
only the pool I changed the values in so that I do not possibly
disrupt the other pools running.

On Jul 30, 5:38 pm, Gints Murāns <gints.mur...@gmail.com> wrote:
> What happens with other pools when one of the pools have gateway
> timeout? I mean when there is some long script running, that takes up
> all the pool resources. I guess that would have to affect other pools.
> So I want to restart this one, why should I those others? Especially
> when there is a lot of webpages and a lot of pools.
>
> On Jul 26, 9:35 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
>
> > 2010/7/26 GM <g...@gm.lv>:
>
> > > I would like to know that too.
>
> > can you describe why you want that ? what is the need ? Before coding
> > anything I'd like to be sure the solution is the right one.
>
> > > On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com> wrote:
> > >> I think i can remember that i have somewhere read about that feature or
> > >> feature wish!
> > >> Is it possible to restart only a specific pool and not the whole FPM? Is it
> > >> planned to support that?
>
> > >> Thanks
>
> > >> Kind regards
>
> > >> ---
>
> > >> *Thomas FRITZ*
> > >> *web*http://fritzthomas.com
> > >> *twitter*http://twitter.com/thomasf
>
>
iain wright
Re: Seperate restarting of a pool!?
August 19, 2010 03:38PM
Agreed, we are close to deploying 8 CMS sites on a new server each running
in its own php-fpm pool, seems silly to have to restart all of them if
something happened to 1 site.

That being said, phpfpm has worked like a charm and I love it.

Iain Wright
LAN Administrator - CBIS
USC Clinical Translational Science Institute



On Thu, Aug 19, 2010 at 8:43 AM, Diemuzi <diemuzi@gmail.com> wrote:

> Changing per pool values is a big part for me. I would rather restart
> only the pool I changed the values in so that I do not possibly
> disrupt the other pools running.
>
> On Jul 30, 5:38 pm, Gints Murāns <gints.mur...@gmail.com> wrote:
> > What happens with other pools when one of the pools have gateway
> > timeout? I mean when there is some long script running, that takes up
> > all the pool resources. I guess that would have to affect other pools.
> > So I want to restart this one, why should I those others? Especially
> > when there is a lot of webpages and a lot of pools.
> >
> > On Jul 26, 9:35 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
> >
> > > 2010/7/26 GM <g...@gm.lv>:
> >
> > > > I would like to know that too.
> >
> > > can you describe why you want that ? what is the need ? Before coding
> > > anything I'd like to be sure the solution is the right one.
> >
> > > > On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com> wrote:
> > > >> I think i can remember that i have somewhere read about that feature
> or
> > > >> feature wish!
> > > >> Is it possible to restart only a specific pool and not the whole
> FPM? Is it
> > > >> planned to support that?
> >
> > > >> Thanks
> >
> > > >> Kind regards
> >
> > > >> ---
> >
> > > >> *Thomas FRITZ*
> > > >> *web*http://fritzthomas.com
> > > >> *twitter*http://twitter.com/thomasf
> >
> >
>
Re: Seperate restarting of a pool!?
August 19, 2010 03:38PM
On Thu, Aug 19, 2010 at 8:43 AM, Diemuzi <diemuzi@gmail.com> wrote:
> Changing per pool values is a big part for me. I would rather restart
> only the pool I changed the values in so that I do not possibly
> disrupt the other pools running.

it's not what you want exactly, but reloading (not restarting) php-fpm
should be a graceful way to apply changes (it will do all pools, but
gracefully, you should not see any downtime or oddities come up)
Jérôme Loyet
Re: Seperate restarting of a pool!?
August 19, 2010 03:44PM
2010/8/19 iain wright <iainwrig@usc.edu>:
> Agreed, we are close to deploying 8 CMS sites on a new server each running
> in its own php-fpm pool, seems silly to have to restart all of them if
> something happened to 1 site.

it's definetely not possible by design. If you really want to separate
each site, launch 8 instances of FPM with only one pool each. But it
would not be that *beautiful*. With the include feature on the fpm
conf file, you can share values between differents FPM conf files.

>
> That being said, phpfpm has worked like a charm and I love it.

Love to hear that :)

>
> Iain Wright
> LAN Administrator - CBIS
> USC Clinical Translational Science Institute
>
>
>
> On Thu, Aug 19, 2010 at 8:43 AM, Diemuzi <diemuzi@gmail.com> wrote:
>>
>> Changing per pool values is a big part for me. I would rather restart
>> only the pool I changed the values in so that I do not possibly
>> disrupt the other pools running.
>>
>> On Jul 30, 5:38 pm, Gints Murāns <gints.mur...@gmail.com> wrote:
>> > What happens with other pools when one of the pools have gateway
>> > timeout? I mean when there is some long script running, that takes up
>> > all the pool resources. I guess that would have to affect other pools.
>> > So I want to restart this one, why should I those others? Especially
>> > when there is a lot of webpages and a lot of pools.
>> >
>> > On Jul 26, 9:35 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
>> >
>> > > 2010/7/26 GM <g...@gm.lv>:
>> >
>> > > > I would like to know that too.
>> >
>> > > can you describe why you want that ? what is the need ? Before coding
>> > > anything I'd like to be sure the solution is the right one.
>> >
>> > > > On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com> wrote:
>> > > >> I think i can remember that i have somewhere read about that
>> > > >> feature or
>> > > >> feature wish!
>> > > >> Is it possible to restart only a specific pool and not the whole
>> > > >> FPM? Is it
>> > > >> planned to support that?
>> >
>> > > >> Thanks
>> >
>> > > >> Kind regards
>> >
>> > > >> ---
>> >
>> > > >> *Thomas FRITZ*
>> > > >> *web*http://fritzthomas.com
>> > > >> *twitter*http://twitter.com/thomasf
>> >
>> >
>
Thomas Fritz
Re: Seperate restarting of a pool!?
August 20, 2010 03:26AM
Hi!

If such a graceful reload/restart does not disrupt any pool, such a graceful
reload/restart of configuration changes in a pool (and i think thats most
common use case) is more than sufficient.
But in case a pool hangs ( i do not know if it possible, if it can happen
and when how php-fpm handles this - i do not know anything from the
technical design behind php-fpm) a restart of that specific pool would be
better. Or is it possible to check for such cases in the graceful restart
option?

But anyway. php-fpm is great and i am really happy that they included it in
5.3.3 than 5.4! Thank you very much for your hard work!

Kind regards


---

*Thomas FRITZ*
*web* http://fritzthomas.com
*twitter* http://twitter.com/thomasf


2010/8/19 Jérôme Loyet <ml@fatbsd.com>

> 2010/8/19 iain wright <iainwrig@usc.edu>:
> > Agreed, we are close to deploying 8 CMS sites on a new server each
> running
> > in its own php-fpm pool, seems silly to have to restart all of them if
> > something happened to 1 site.
>
> it's definetely not possible by design. If you really want to separate
> each site, launch 8 instances of FPM with only one pool each. But it
> would not be that *beautiful*. With the include feature on the fpm
> conf file, you can share values between differents FPM conf files.
>
> >
> > That being said, phpfpm has worked like a charm and I love it.
>
> Love to hear that :)
>
> >
> > Iain Wright
> > LAN Administrator - CBIS
> > USC Clinical Translational Science Institute
> >
> >
> >
> > On Thu, Aug 19, 2010 at 8:43 AM, Diemuzi <diemuzi@gmail.com> wrote:
> >>
> >> Changing per pool values is a big part for me. I would rather restart
> >> only the pool I changed the values in so that I do not possibly
> >> disrupt the other pools running.
> >>
> >> On Jul 30, 5:38 pm, Gints Murāns <gints.mur...@gmail.com> wrote:
> >> > What happens with other pools when one of the pools have gateway
> >> > timeout? I mean when there is some long script running, that takes up
> >> > all the pool resources. I guess that would have to affect other pools.
> >> > So I want to restart this one, why should I those others? Especially
> >> > when there is a lot of webpages and a lot of pools.
> >> >
> >> > On Jul 26, 9:35 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
> >> >
> >> > > 2010/7/26 GM <g...@gm.lv>:
> >> >
> >> > > > I would like to know that too.
> >> >
> >> > > can you describe why you want that ? what is the need ? Before
> coding
> >> > > anything I'd like to be sure the solution is the right one.
> >> >
> >> > > > On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com> wrote:
> >> > > >> I think i can remember that i have somewhere read about that
> >> > > >> feature or
> >> > > >> feature wish!
> >> > > >> Is it possible to restart only a specific pool and not the whole
> >> > > >> FPM? Is it
> >> > > >> planned to support that?
> >> >
> >> > > >> Thanks
> >> >
> >> > > >> Kind regards
> >> >
> >> > > >> ---
> >> >
> >> > > >> *Thomas FRITZ*
> >> > > >> *web*http://fritzthomas.com
> >> > > >> *twitter*http://twitter.com/thomasf
> >> >
> >> >
>
Jérôme Loyet
Re: Seperate restarting of a pool!?
August 20, 2010 03:50AM
Hi,

I was thinking about all that.

There is maybe a feature which can help in this case.

what if there is a "pid" directive per pool. In this case FPM will
write in this PID file each process PIDs dedicated to a pool. So that,
if you want to restart a pool, you'll be able to do it using the kill
command.

[global]
pid=/var/run/php-fpm.pid ; master process PID
....
[www.foo.bar]
pid=/home/www/www.foo.bar/logs/php-fpm.pid
....
[www.domain.com]
pid=/home/www/www.domain.com/logs/php-fpm.pid
....

In /var/run/php-fpm.pid, you'll have only the master process PID.
You'll be able to stop/reload everything as usual. Nothing change
here.

In /home/www/www.foo.bar/logs/php-fpm.pid, you'll have only the PIDs
of the processes dedicated to the pool www.foo.bar using :

kill `cat /home/www/www.foo.bar/logs/php-fpm.pid`

The same for www.domain.com by using :
kill `cat /home/www/www.domain.com/logs/php-fpm.pid`

This will allow processes to restart a pool, to reload php.ini content
but it WON'T reload any FPM related conf.

what do you think ?

++ jerome

2010/8/20 Thomas Fritz <fritztho@gmail.com>:
> Hi!
> If such a graceful reload/restart does not disrupt any pool, such a graceful
> reload/restart of configuration changes in a pool (and i think thats most
> common use case) is more than sufficient.
> But in case a pool hangs ( i do not know if it possible, if it can happen
> and when how php-fpm handles this - i do not know anything from the
> technical design behind php-fpm) a restart of that specific pool would be
> better. Or is it possible to check for such cases in the graceful restart
> option?
> But anyway. php-fpm is great and i am really happy that they included it in
> 5.3.3 than 5.4! Thank you very much for your hard work!
> Kind regards
>
> ---
> Thomas FRITZ
> web http://fritzthomas.com
> twitter http://twitter.com/thomasf
>
> 2010/8/19 Jérôme Loyet <ml@fatbsd.com>
>>
>> 2010/8/19 iain wright <iainwrig@usc.edu>:
>> > Agreed, we are close to deploying 8 CMS sites on a new server each
>> > running
>> > in its own php-fpm pool, seems silly to have to restart all of them if
>> > something happened to 1 site.
>>
>> it's definetely not possible by design. If you really want to separate
>> each site, launch 8 instances of FPM with only one pool each. But it
>> would not be that *beautiful*. With the include feature on the fpm
>> conf file, you can share values between differents FPM conf files.
>>
>> >
>> > That being said, phpfpm has worked like a charm and I love it.
>>
>> Love to hear that :)
>>
>> >
>> > Iain Wright
>> > LAN Administrator - CBIS
>> > USC Clinical Translational Science Institute
>> >
>> >
>> >
>> > On Thu, Aug 19, 2010 at 8:43 AM, Diemuzi <diemuzi@gmail.com> wrote:
>> >>
>> >> Changing per pool values is a big part for me. I would rather restart
>> >> only the pool I changed the values in so that I do not possibly
>> >> disrupt the other pools running.
>> >>
>> >> On Jul 30, 5:38 pm, Gints Murāns <gints.mur...@gmail.com> wrote:
>> >> > What happens with other pools when one of the pools have gateway
>> >> > timeout? I mean when there is some long script running, that takes up
>> >> > all the pool resources. I guess that would have to affect other
>> >> > pools.
>> >> > So I want to restart this one, why should I those others? Especially
>> >> > when there is a lot of webpages and a lot of pools.
>> >> >
>> >> > On Jul 26, 9:35 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
>> >> >
>> >> > > 2010/7/26 GM <g...@gm.lv>:
>> >> >
>> >> > > > I would like to know that too.
>> >> >
>> >> > > can you describe why you want that ? what is the need ? Before
>> >> > > coding
>> >> > > anything I'd like to be sure the solution is the right one.
>> >> >
>> >> > > > On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com> wrote:
>> >> > > >> I think i can remember that i have somewhere read about that
>> >> > > >> feature or
>> >> > > >> feature wish!
>> >> > > >> Is it possible to restart only a specific pool and not the whole
>> >> > > >> FPM? Is it
>> >> > > >> planned to support that?
>> >> >
>> >> > > >> Thanks
>> >> >
>> >> > > >> Kind regards
>> >> >
>> >> > > >> ---
>> >> >
>> >> > > >> *Thomas FRITZ*
>> >> > > >> *web*http://fritzthomas.com
>> >> > > >> *twitter*http://twitter.com/thomasf
>> >> >
>> >> >
>
Gints Murāns
Re: Seperate restarting of a pool!?
August 20, 2010 04:04AM
So if I kill one pool, master process will rerun this pool? I mean how
this pool will be started after killing it?

On Aug 20, 10:47 am, Jérôme Loyet <m...@fatbsd.com> wrote:
> Hi,
>
> I was thinking about all that.
>
> There is maybe a feature which can help in this case.
>
> what if there is a "pid" directive per pool. In this case FPM will
> write in this PID file each process PIDs dedicated to a pool. So that,
> if you want to restart a pool, you'll be able to do it using the kill
> command.
>
> [global]
> pid=/var/run/php-fpm.pid ; master process PID
> ...
> [www.foo.bar]
> pid=/home/www/www.foo.bar/logs/php-fpm.pid
> ...
> [www.domain.com]
> pid=/home/www/www.domain.com/logs/php-fpm.pid
> ...
>
> In /var/run/php-fpm.pid, you'll have only the master process PID.
> You'll be able to stop/reload everything as usual. Nothing change
> here.
>
> In /home/www/www.foo.bar/logs/php-fpm.pid, you'll have only the PIDs
> of the processes dedicated to the poolwww.foo.barusing :
>
> kill `cat /home/www/www.foo.bar/logs/php-fpm.pid`
>
> The same forwww.domain.comby using :
> kill `cat /home/www/www.domain.com/logs/php-fpm.pid`
>
> This will allow processes to restart a pool, to reload php.ini content
> but it WON'T reload any FPM related conf.
>
> what do you think ?
>
> ++ jerome
>
> 2010/8/20 Thomas Fritz <fritz...@gmail.com>:
>
> > Hi!
> > If such a graceful reload/restart does not disrupt any pool, such a graceful
> > reload/restart of configuration changes in a pool (and i think thats most
> > common use case) is more than sufficient.
> > But in case a pool hangs ( i do not know if it possible, if it can happen
> > and when how php-fpm handles this - i do not know anything from the
> > technical design behind php-fpm) a restart of that specific pool would be
> > better. Or is it possible to check for such cases in the graceful restart
> > option?
> > But anyway. php-fpm is great and i am really happy that they included it in
> > 5.3.3 than 5.4! Thank you very much for your hard work!
> > Kind regards
>
> > ---
> > Thomas FRITZ
> > web http://fritzthomas.com
> > twitter http://twitter.com/thomasf
>
> > 2010/8/19 Jérôme Loyet <m...@fatbsd.com>
>
> >> 2010/8/19 iain wright <iainw...@usc.edu>:
> >> > Agreed, we are close to deploying 8 CMS sites on a new server each
> >> > running
> >> > in its own php-fpm pool, seems silly to have to restart all of them if
> >> > something happened to 1 site.
>
> >> it's definetely not possible by design. If you really want to separate
> >> each site, launch 8 instances of FPM with only one pool each. But it
> >> would not be that *beautiful*. With the include feature on the fpm
> >> conf file, you can share values between differents FPM conf files.
>
> >> > That being said, phpfpm has worked like a charm and I love it.
>
> >> Love to hear that :)
>
> >> > Iain Wright
> >> > LAN Administrator - CBIS
> >> > USC Clinical Translational Science Institute
>
> >> > On Thu, Aug 19, 2010 at 8:43 AM, Diemuzi <diem...@gmail.com> wrote:
>
> >> >> Changing per pool values is a big part for me. I would rather restart
> >> >> only the pool I changed the values in so that I do not possibly
> >> >> disrupt the other pools running.
>
> >> >> On Jul 30, 5:38 pm, Gints Murāns <gints.mur...@gmail.com> wrote:
> >> >> > What happens with other pools when one of the pools have gateway
> >> >> > timeout? I mean when there is some long script running, that takes up
> >> >> > all the pool resources. I guess that would have to affect other
> >> >> > pools.
> >> >> > So I want to restart this one, why should I those others? Especially
> >> >> > when there is a lot of webpages and a lot of pools.
>
> >> >> > On Jul 26, 9:35 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
>
> >> >> > > 2010/7/26 GM <g...@gm.lv>:
>
> >> >> > > > I would like to know that too.
>
> >> >> > > can you describe why you want that ? what is the need ? Before
> >> >> > > coding
> >> >> > > anything I'd like to be sure the solution is the right one.
>
> >> >> > > > On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com> wrote:
> >> >> > > >> I think i can remember that i have somewhere read about that
> >> >> > > >> feature or
> >> >> > > >> feature wish!
> >> >> > > >> Is it possible to restart only a specific pool and not the whole
> >> >> > > >> FPM? Is it
> >> >> > > >> planned to support that?
>
> >> >> > > >> Thanks
>
> >> >> > > >> Kind regards
>
> >> >> > > >> ---
>
> >> >> > > >> *Thomas FRITZ*
> >> >> > > >> *web*http://fritzthomas.com
> >> >> > > >> *twitter*http://twitter.com/thomasf
>
>
Thomas Fritz
Re: Seperate restarting of a pool!?
August 20, 2010 04:06AM
2010/8/20 Jérôme Loyet <ml@fatbsd.com>

> Hi,
>
> I was thinking about all that.
>
> There is maybe a feature which can help in this case.
>
> what if there is a "pid" directive per pool. In this case FPM will
> write in this PID file each process PIDs dedicated to a pool. So that,
> if you want to restart a pool, you'll be able to do it using the kill
> command.
>
> [global]
> pid=/var/run/php-fpm.pid ; master process PID
> ...
> [www.foo.bar]
> pid=/home/www/www.foo.bar/logs/php-fpm.pid
> ...
> [www.domain.com]
> pid=/home/www/www.domain.com/logs/php-fpm.pid
> ...
>
> In /var/run/php-fpm.pid, you'll have only the master process PID.
> You'll be able to stop/reload everything as usual. Nothing change
> here.
>

As i understand you: There is a php-fpm reload which only reloads the
configuration files - does a graceful restart?


>
> In /home/www/www.foo.bar/logs/php-fpm.pid, you'll have only the PIDs
> of the processes dedicated to the pool www.foo.bar using :
>
> kill `cat /home/www/www.foo.bar/logs/php-fpm.pid`
>

Which will only kill all child processes of that specific pool but not the
"master process" of that pool itself, right?


>
> The same for www.domain.com by using :
> kill `cat /home/www/www.domain.com/logs/php-fpm.pid`
>
> This will allow processes to restart a pool, to reload php.ini content
> but it WON'T reload any FPM related conf.
>

As i understand, it WILL reload pool specific php.ini, ENV and other
configuration values!?

If that works that easy and the fpm process recreates its child process
after killing without problems - GREAT!


>
> what do you think ?
>
> ++ jerome
>
> 2010/8/20 Thomas Fritz <fritztho@gmail.com>:
> > Hi!
> > If such a graceful reload/restart does not disrupt any pool, such a
> graceful
> > reload/restart of configuration changes in a pool (and i think thats most
> > common use case) is more than sufficient.
> > But in case a pool hangs ( i do not know if it possible, if it can happen
> > and when how php-fpm handles this - i do not know anything from the
> > technical design behind php-fpm) a restart of that specific pool would be
> > better. Or is it possible to check for such cases in the graceful restart
> > option?
> > But anyway. php-fpm is great and i am really happy that they included it
> in
> > 5.3.3 than 5.4! Thank you very much for your hard work!
> > Kind regards
> >
> > ---
> > Thomas FRITZ
> > web http://fritzthomas.com
> > twitter http://twitter.com/thomasf
> >
> > 2010/8/19 Jérôme Loyet <ml@fatbsd.com>
> >>
> >> 2010/8/19 iain wright <iainwrig@usc.edu>:
> >> > Agreed, we are close to deploying 8 CMS sites on a new server each
> >> > running
> >> > in its own php-fpm pool, seems silly to have to restart all of them if
> >> > something happened to 1 site.
> >>
> >> it's definetely not possible by design. If you really want to separate
> >> each site, launch 8 instances of FPM with only one pool each. But it
> >> would not be that *beautiful*. With the include feature on the fpm
> >> conf file, you can share values between differents FPM conf files.
> >>
> >> >
> >> > That being said, phpfpm has worked like a charm and I love it.
> >>
> >> Love to hear that :)
> >>
> >> >
> >> > Iain Wright
> >> > LAN Administrator - CBIS
> >> > USC Clinical Translational Science Institute
> >> >
> >> >
> >> >
> >> > On Thu, Aug 19, 2010 at 8:43 AM, Diemuzi <diemuzi@gmail.com> wrote:
> >> >>
> >> >> Changing per pool values is a big part for me. I would rather restart
> >> >> only the pool I changed the values in so that I do not possibly
> >> >> disrupt the other pools running.
> >> >>
> >> >> On Jul 30, 5:38 pm, Gints Murāns <gints.mur...@gmail.com> wrote:
> >> >> > What happens with other pools when one of the pools have gateway
> >> >> > timeout? I mean when there is some long script running, that takes
> up
> >> >> > all the pool resources. I guess that would have to affect other
> >> >> > pools.
> >> >> > So I want to restart this one, why should I those others?
> Especially
> >> >> > when there is a lot of webpages and a lot of pools.
> >> >> >
> >> >> > On Jul 26, 9:35 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
> >> >> >
> >> >> > > 2010/7/26 GM <g...@gm.lv>:
> >> >> >
> >> >> > > > I would like to know that too.
> >> >> >
> >> >> > > can you describe why you want that ? what is the need ? Before
> >> >> > > coding
> >> >> > > anything I'd like to be sure the solution is the right one.
> >> >> >
> >> >> > > > On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com> wrote:
> >> >> > > >> I think i can remember that i have somewhere read about that
> >> >> > > >> feature or
> >> >> > > >> feature wish!
> >> >> > > >> Is it possible to restart only a specific pool and not the
> whole
> >> >> > > >> FPM? Is it
> >> >> > > >> planned to support that?
> >> >> >
> >> >> > > >> Thanks
> >> >> >
> >> >> > > >> Kind regards
> >> >> >
> >> >> > > >> ---
> >> >> >
> >> >> > > >> *Thomas FRITZ*
> >> >> > > >> *web*http://fritzthomas.com
> >> >> > > >> *twitter*http://twitter.com/thomasf
> >> >> >
> >> >> >
> >
>



--



---

*Thomas FRITZ*
*web* http://fritzthomas.com
*twitter* http://twitter.com/thomasf
Jérôme Loyet
Re: Seperate restarting of a pool!?
August 20, 2010 04:06AM
2010/8/20 Gints Murāns <gints.murans@gmail.com>:
> So if I kill one pool, master process will rerun this pool? I mean how
> this pool will be started after killing it?

Yes of course, the master process *almost* only job is to watch out
the pool processes and manage them (kill, start, reload, restart,
....). So if you kill all the processes of one pool by hand on your
system, the master process will restart them. You can try by yourself.

++ jerome

>
> On Aug 20, 10:47 am, Jérôme Loyet <m...@fatbsd.com> wrote:
>> Hi,
>>
>> I was thinking about all that.
>>
>> There is maybe a feature which can help in this case.
>>
>> what if there is a "pid" directive per pool. In this case FPM will
>> write in this PID file each process PIDs dedicated to a pool. So that,
>> if you want to restart a pool, you'll be able to do it using the kill
>> command.
>>
>> [global]
>> pid=/var/run/php-fpm.pid ; master process PID
>> ...
>> [www.foo.bar]
>> pid=/home/www/www.foo.bar/logs/php-fpm.pid
>> ...
>> [www.domain.com]
>> pid=/home/www/www.domain.com/logs/php-fpm.pid
>> ...
>>
>> In /var/run/php-fpm.pid, you'll have only the master process PID.
>> You'll be able to stop/reload everything as usual. Nothing change
>> here.
>>
>> In /home/www/www.foo.bar/logs/php-fpm.pid, you'll have only the PIDs
>> of the processes dedicated to the poolwww.foo.barusing :
>>
>> kill `cat /home/www/www.foo.bar/logs/php-fpm.pid`
>>
>> The same forwww.domain.comby using :
>> kill `cat /home/www/www.domain.com/logs/php-fpm.pid`
>>
>> This will allow processes to restart a pool, to reload php.ini content
>> but it WON'T reload any FPM related conf.
>>
>> what do you think ?
>>
>> ++ jerome
>>
>> 2010/8/20 Thomas Fritz <fritz...@gmail.com>:
>>
>> > Hi!
>> > If such a graceful reload/restart does not disrupt any pool, such a graceful
>> > reload/restart of configuration changes in a pool (and i think thats most
>> > common use case) is more than sufficient.
>> > But in case a pool hangs ( i do not know if it possible, if it can happen
>> > and when how php-fpm handles this - i do not know anything from the
>> > technical design behind php-fpm) a restart of that specific pool would be
>> > better. Or is it possible to check for such cases in the graceful restart
>> > option?
>> > But anyway. php-fpm is great and i am really happy that they included it in
>> > 5.3.3 than 5.4! Thank you very much for your hard work!
>> > Kind regards
>>
>> > ---
>> > Thomas FRITZ
>> > web http://fritzthomas.com
>> > twitter http://twitter.com/thomasf
>>
>> > 2010/8/19 Jérôme Loyet <m...@fatbsd.com>
>>
>> >> 2010/8/19 iain wright <iainw...@usc.edu>:
>> >> > Agreed, we are close to deploying 8 CMS sites on a new server each
>> >> > running
>> >> > in its own php-fpm pool, seems silly to have to restart all of them if
>> >> > something happened to 1 site.
>>
>> >> it's definetely not possible by design. If you really want to separate
>> >> each site, launch 8 instances of FPM with only one pool each. But it
>> >> would not be that *beautiful*. With the include feature on the fpm
>> >> conf file, you can share values between differents FPM conf files.
>>
>> >> > That being said, phpfpm has worked like a charm and I love it.
>>
>> >> Love to hear that :)
>>
>> >> > Iain Wright
>> >> > LAN Administrator - CBIS
>> >> > USC Clinical Translational Science Institute
>>
>> >> > On Thu, Aug 19, 2010 at 8:43 AM, Diemuzi <diem...@gmail.com> wrote:
>>
>> >> >> Changing per pool values is a big part for me. I would rather restart
>> >> >> only the pool I changed the values in so that I do not possibly
>> >> >> disrupt the other pools running.
>>
>> >> >> On Jul 30, 5:38 pm, Gints Murāns <gints.mur...@gmail.com> wrote:
>> >> >> > What happens with other pools when one of the pools have gateway
>> >> >> > timeout? I mean when there is some long script running, that takes up
>> >> >> > all the pool resources. I guess that would have to affect other
>> >> >> > pools.
>> >> >> > So I want to restart this one, why should I those others? Especially
>> >> >> > when there is a lot of webpages and a lot of pools.
>>
>> >> >> > On Jul 26, 9:35 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
>>
>> >> >> > > 2010/7/26 GM <g...@gm.lv>:
>>
>> >> >> > > > I would like to know that too.
>>
>> >> >> > > can you describe why you want that ? what is the need ? Before
>> >> >> > > coding
>> >> >> > > anything I'd like to be sure the solution is the right one.
>>
>> >> >> > > > On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com> wrote:
>> >> >> > > >> I think i can remember that i have somewhere read about that
>> >> >> > > >> feature or
>> >> >> > > >> feature wish!
>> >> >> > > >> Is it possible to restart only a specific pool and not the whole
>> >> >> > > >> FPM? Is it
>> >> >> > > >> planned to support that?
>>
>> >> >> > > >> Thanks
>>
>> >> >> > > >> Kind regards
>>
>> >> >> > > >> ---
>>
>> >> >> > > >> *Thomas FRITZ*
>> >> >> > > >> *web*http://fritzthomas.com
>> >> >> > > >> *twitter*http://twitter.com/thomasf
>>
>>
>
Jérôme Loyet
Re: Seperate restarting of a pool!?
August 20, 2010 04:16AM
2010/8/20 Thomas Fritz <fritztho@gmail.com>:
>
>
> 2010/8/20 Jérôme Loyet <ml@fatbsd.com>
>>
>> Hi,
>>
>> I was thinking about all that.
>>
>> There is maybe a feature which can help in this case.
>>
>> what if there is a "pid" directive per pool. In this case FPM will
>> write in this PID file each process PIDs dedicated to a pool. So that,
>> if you want to restart a pool, you'll be able to do it using the kill
>> command.
>>
>> [global]
>> pid=/var/run/php-fpm.pid ; master process PID
>> ...
>> [www.foo.bar]
>> pid=/home/www/www.foo.bar/logs/php-fpm.pid
>> ...
>> [www.domain.com]
>> pid=/home/www/www.domain.com/logs/php-fpm.pid
>> ...
>>
>> In /var/run/php-fpm.pid, you'll have only the master process PID.
>> You'll be able to stop/reload everything as usual. Nothing change
>> here.
>
> As i understand you: There is a php-fpm reload which only reloads the
> configuration files - does a graceful restart?

yes. man php-fpm tells you about this:

Once started, php-fpm then responds to several POSIX signals:

SIGINT,SIGTERM immediate termination
SIGQUIT graceful stop
SIGUSR1 re-open log file
SIGUSR2 graceful reload of all workers + reload of fpm conf/binary

>
>>
>> In /home/www/www.foo.bar/logs/php-fpm.pid, you'll have only the PIDs
>> of the processes dedicated to the pool www.foo.bar using :
>>
>> kill `cat /home/www/www.foo.bar/logs/php-fpm.pid`
>
> Which will only kill all child processes of that specific pool but not the
> "master process" of that pool itself, right?

yes

>
>>
>> The same for www.domain.com by using :
>> kill `cat /home/www/www.domain.com/logs/php-fpm.pid`
>>
>> This will allow processes to restart a pool, to reload php.ini content
>> but it WON'T reload any FPM related conf.
>
> As i understand, it WILL reload pool specific php.ini, ENV and other
> configuration values!?

nope. It will reload the php.ini content (/usr/local/php/lib/php.ini
for example) but it WON'T reload anything present on the php-fpm.conf
(/usr/local/php/etc/php-fpm.conf). To reload the php-fpm.conf you'l
have to reload the master process which will restart all pool
processes. There is nothing to do about this.

> If that works that easy and the fpm process recreates its child process
> after killing without problems - GREAT!

it already works that easy. kill by hand all the FPM child processes
and you'll see that they'll be recreated by the master process. I'm
just proposing to note thoses PID in one file per pool to make
operations easier. That's all.

>
>>
>> what do you think ?
>>
>> ++ jerome
>>
>> 2010/8/20 Thomas Fritz <fritztho@gmail.com>:
>> > Hi!
>> > If such a graceful reload/restart does not disrupt any pool, such a
>> > graceful
>> > reload/restart of configuration changes in a pool (and i think thats
>> > most
>> > common use case) is more than sufficient.
>> > But in case a pool hangs ( i do not know if it possible, if it can
>> > happen
>> > and when how php-fpm handles this - i do not know anything from the
>> > technical design behind php-fpm) a restart of that specific pool would
>> > be
>> > better. Or is it possible to check for such cases in the graceful
>> > restart
>> > option?
>> > But anyway. php-fpm is great and i am really happy that they included it
>> > in
>> > 5.3.3 than 5.4! Thank you very much for your hard work!
>> > Kind regards
>> >
>> > ---
>> > Thomas FRITZ
>> > web http://fritzthomas.com
>> > twitter http://twitter.com/thomasf
>> >
>> > 2010/8/19 Jérôme Loyet <ml@fatbsd.com>
>> >>
>> >> 2010/8/19 iain wright <iainwrig@usc.edu>:
>> >> > Agreed, we are close to deploying 8 CMS sites on a new server each
>> >> > running
>> >> > in its own php-fpm pool, seems silly to have to restart all of them
>> >> > if
>> >> > something happened to 1 site.
>> >>
>> >> it's definetely not possible by design. If you really want to separate
>> >> each site, launch 8 instances of FPM with only one pool each. But it
>> >> would not be that *beautiful*. With the include feature on the fpm
>> >> conf file, you can share values between differents FPM conf files.
>> >>
>> >> >
>> >> > That being said, phpfpm has worked like a charm and I love it.
>> >>
>> >> Love to hear that :)
>> >>
>> >> >
>> >> > Iain Wright
>> >> > LAN Administrator - CBIS
>> >> > USC Clinical Translational Science Institute
>> >> >
>> >> >
>> >> >
>> >> > On Thu, Aug 19, 2010 at 8:43 AM, Diemuzi <diemuzi@gmail.com> wrote:
>> >> >>
>> >> >> Changing per pool values is a big part for me. I would rather
>> >> >> restart
>> >> >> only the pool I changed the values in so that I do not possibly
>> >> >> disrupt the other pools running.
>> >> >>
>> >> >> On Jul 30, 5:38 pm, Gints Murāns <gints.mur...@gmail.com> wrote:
>> >> >> > What happens with other pools when one of the pools have gateway
>> >> >> > timeout? I mean when there is some long script running, that takes
>> >> >> > up
>> >> >> > all the pool resources. I guess that would have to affect other
>> >> >> > pools.
>> >> >> > So I want to restart this one, why should I those others?
>> >> >> > Especially
>> >> >> > when there is a lot of webpages and a lot of pools.
>> >> >> >
>> >> >> > On Jul 26, 9:35 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
>> >> >> >
>> >> >> > > 2010/7/26 GM <g...@gm.lv>:
>> >> >> >
>> >> >> > > > I would like to know that too.
>> >> >> >
>> >> >> > > can you describe why you want that ? what is the need ? Before
>> >> >> > > coding
>> >> >> > > anything I'd like to be sure the solution is the right one.
>> >> >> >
>> >> >> > > > On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com> wrote:
>> >> >> > > >> I think i can remember that i have somewhere read about that
>> >> >> > > >> feature or
>> >> >> > > >> feature wish!
>> >> >> > > >> Is it possible to restart only a specific pool and not the
>> >> >> > > >> whole
>> >> >> > > >> FPM? Is it
>> >> >> > > >> planned to support that?
>> >> >> >
>> >> >> > > >> Thanks
>> >> >> >
>> >> >> > > >> Kind regards
>> >> >> >
>> >> >> > > >> ---
>> >> >> >
>> >> >> > > >> *Thomas FRITZ*
>> >> >> > > >> *web*http://fritzthomas.com
>> >> >> > > >> *twitter*http://twitter.com/thomasf
>> >> >> >
>> >> >> >
>> >
>
>
>
> --
>
>
>
> ---
> Thomas FRITZ
> web http://fritzthomas.com
> twitter http://twitter.com/thomasf
>
Gints Murāns
Re: Seperate restarting of a pool!?
August 20, 2010 07:06AM
Yes, I agree that it would solve it. I have a startup script already
in mind for this :) I mean command line could look something like
this: "/etc/init.d/php-fpm restart-pool www"

On Aug 20, 11:15 am, Jérôme Loyet <m...@fatbsd.com> wrote:
> 2010/8/20 Thomas Fritz <fritz...@gmail.com>:
>
>
>
>
>
> > 2010/8/20 Jérôme Loyet <m...@fatbsd.com>
>
> >> Hi,
>
> >> I was thinking about all that.
>
> >> There is maybe a feature which can help in this case.
>
> >> what if there is a "pid" directive per pool. In this case FPM will
> >> write in this PID file each process PIDs dedicated to a pool. So that,
> >> if you want to restart a pool, you'll be able to do it using the kill
> >> command.
>
> >> [global]
> >> pid=/var/run/php-fpm.pid ; master process PID
> >> ...
> >> [www.foo.bar]
> >> pid=/home/www/www.foo.bar/logs/php-fpm.pid
> >> ...
> >> [www.domain.com]
> >> pid=/home/www/www.domain.com/logs/php-fpm.pid
> >> ...
>
> >> In /var/run/php-fpm.pid, you'll have only the master process PID.
> >> You'll be able to stop/reload everything as usual. Nothing change
> >> here.
>
> > As i understand you: There is a php-fpm reload which only reloads the
> > configuration files - does a graceful restart?
>
> yes. man php-fpm tells you about this:
>
> Once started, php-fpm then responds to several POSIX signals:
>
>  SIGINT,SIGTERM      immediate termination
>  SIGQUIT             graceful stop
>  SIGUSR1             re-open log file
>  SIGUSR2             graceful reload of all workers + reload of fpm conf/binary
>
>
>
> >> In /home/www/www.foo.bar/logs/php-fpm.pid, you'll have only the PIDs
> >> of the processes dedicated to the poolwww.foo.barusing :
>
> >> kill `cat /home/www/www.foo.bar/logs/php-fpm.pid`
>
> > Which will only kill all child processes of that specific pool but not the
> > "master process" of that pool itself, right?
>
> yes
>
>
>
> >> The same forwww.domain.comby using :
> >> kill `cat /home/www/www.domain.com/logs/php-fpm.pid`
>
> >> This will allow processes to restart a pool, to reload php.ini content
> >> but it WON'T reload any FPM related conf.
>
> > As i understand, it WILL reload pool specific php.ini, ENV and other
> > configuration values!?
>
> nope. It will reload the php.ini content (/usr/local/php/lib/php.ini
> for example) but it WON'T reload anything present on the php-fpm.conf
> (/usr/local/php/etc/php-fpm.conf). To reload the php-fpm.conf you'l
> have to reload the master process which will restart all pool
> processes. There is nothing to do about this.
>
> > If that works that easy and the fpm process recreates its child process
> > after killing without problems - GREAT!
>
> it already works that easy. kill by hand all the FPM child processes
> and you'll see that they'll be recreated by the master process. I'm
> just proposing to note thoses PID in one file per pool to make
> operations easier. That's all.
>
>
>
> >> what do you think ?
>
> >> ++ jerome
>
> >> 2010/8/20 Thomas Fritz <fritz...@gmail.com>:
> >> > Hi!
> >> > If such a graceful reload/restart does not disrupt any pool, such a
> >> > graceful
> >> > reload/restart of configuration changes in a pool (and i think thats
> >> > most
> >> > common use case) is more than sufficient.
> >> > But in case a pool hangs ( i do not know if it possible, if it can
> >> > happen
> >> > and when how php-fpm handles this - i do not know anything from the
> >> > technical design behind php-fpm) a restart of that specific pool would
> >> > be
> >> > better. Or is it possible to check for such cases in the graceful
> >> > restart
> >> > option?
> >> > But anyway. php-fpm is great and i am really happy that they included it
> >> > in
> >> > 5.3.3 than 5.4! Thank you very much for your hard work!
> >> > Kind regards
>
> >> > ---
> >> > Thomas FRITZ
> >> > web http://fritzthomas.com
> >> > twitter http://twitter.com/thomasf
>
> >> > 2010/8/19 Jérôme Loyet <m...@fatbsd.com>
>
> >> >> 2010/8/19 iain wright <iainw...@usc.edu>:
> >> >> > Agreed, we are close to deploying 8 CMS sites on a new server each
> >> >> > running
> >> >> > in its own php-fpm pool, seems silly to have to restart all of them
> >> >> > if
> >> >> > something happened to 1 site.
>
> >> >> it's definetely not possible by design. If you really want to separate
> >> >> each site, launch 8 instances of FPM with only one pool each. But it
> >> >> would not be that *beautiful*. With the include feature on the fpm
> >> >> conf file, you can share values between differents FPM conf files.
>
> >> >> > That being said, phpfpm has worked like a charm and I love it.
>
> >> >> Love to hear that :)
>
> >> >> > Iain Wright
> >> >> > LAN Administrator - CBIS
> >> >> > USC Clinical Translational Science Institute
>
> >> >> > On Thu, Aug 19, 2010 at 8:43 AM, Diemuzi <diem...@gmail.com> wrote:
>
> >> >> >> Changing per pool values is a big part for me. I would rather
> >> >> >> restart
> >> >> >> only the pool I changed the values in so that I do not possibly
> >> >> >> disrupt the other pools running.
>
> >> >> >> On Jul 30, 5:38 pm, Gints Murāns <gints.mur...@gmail.com> wrote:
> >> >> >> > What happens with other pools when one of the pools have gateway
> >> >> >> > timeout? I mean when there is some long script running, that takes
> >> >> >> > up
> >> >> >> > all the pool resources. I guess that would have to affect other
> >> >> >> > pools.
> >> >> >> > So I want to restart this one, why should I those others?
> >> >> >> > Especially
> >> >> >> > when there is a lot of webpages and a lot of pools.
>
> >> >> >> > On Jul 26, 9:35 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
>
> >> >> >> > > 2010/7/26 GM <g...@gm.lv>:
>
> >> >> >> > > > I would like to know that too.
>
> >> >> >> > > can you describe why you want that ? what is the need ? Before
> >> >> >> > > coding
> >> >> >> > > anything I'd like to be sure the solution is the right one.
>
> >> >> >> > > > On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com> wrote:
> >> >> >> > > >> I think i can remember that i have somewhere read about that
> >> >> >> > > >> feature or
> >> >> >> > > >> feature wish!
> >> >> >> > > >> Is it possible to restart only a specific pool and not the
> >> >> >> > > >> whole
> >> >> >> > > >> FPM? Is it
> >> >> >> > > >> planned to support that?
>
> >> >> >> > > >> Thanks
>
> >> >> >> > > >> Kind regards
>
> >> >> >> > > >> ---
>
> >> >> >> > > >> *Thomas FRITZ*
> >> >> >> > > >> *web*http://fritzthomas.com
> >> >> >> > > >> *twitter*http://twitter.com/thomasf
>
> > --
>
> > ---
> > Thomas FRITZ
> > webhttp://fritzthomas.com
> > twitterhttp://twitter.com/thomasf
>
>
Jérôme Loyet
Re: Seperate restarting of a pool!?
August 20, 2010 07:54AM
2010/8/20 Gints Murāns <gints.murans@gmail.com>:
> Yes, I agree that it would solve it. I have a startup script already
> in mind for this :) I mean command line could look something like
> this: "/etc/init.d/php-fpm restart-pool www"

I also have in mind changing the processes label. Because every
process are labeled "php-fpm opt_args" in ps or top outpout. I'd like
to have

php-fpm: master process
php-fpm: pool www.foo.bar
php-fpm: pool www.foo.bar
php-fpm: pool www.foo.bar
php-fpm: pool www.domain.com
php-fpm: pool www.domain.com
php-fpm: pool www.domain.com

it'll help and will be more clear

>
> On Aug 20, 11:15 am, Jérôme Loyet <m...@fatbsd.com> wrote:
>> 2010/8/20 Thomas Fritz <fritz...@gmail.com>:
>>
>>
>>
>>
>>
>> > 2010/8/20 Jérôme Loyet <m...@fatbsd.com>
>>
>> >> Hi,
>>
>> >> I was thinking about all that.
>>
>> >> There is maybe a feature which can help in this case.
>>
>> >> what if there is a "pid" directive per pool. In this case FPM will
>> >> write in this PID file each process PIDs dedicated to a pool. So that,
>> >> if you want to restart a pool, you'll be able to do it using the kill
>> >> command.
>>
>> >> [global]
>> >> pid=/var/run/php-fpm.pid ; master process PID
>> >> ...
>> >> [www.foo.bar]
>> >> pid=/home/www/www.foo.bar/logs/php-fpm.pid
>> >> ...
>> >> [www.domain.com]
>> >> pid=/home/www/www.domain.com/logs/php-fpm.pid
>> >> ...
>>
>> >> In /var/run/php-fpm.pid, you'll have only the master process PID.
>> >> You'll be able to stop/reload everything as usual. Nothing change
>> >> here.
>>
>> > As i understand you: There is a php-fpm reload which only reloads the
>> > configuration files - does a graceful restart?
>>
>> yes. man php-fpm tells you about this:
>>
>> Once started, php-fpm then responds to several POSIX signals:
>>
>>  SIGINT,SIGTERM      immediate termination
>>  SIGQUIT             graceful stop
>>  SIGUSR1             re-open log file
>>  SIGUSR2             graceful reload of all workers + reload of fpm conf/binary
>>
>>
>>
>> >> In /home/www/www.foo.bar/logs/php-fpm.pid, you'll have only the PIDs
>> >> of the processes dedicated to the poolwww.foo.barusing :
>>
>> >> kill `cat /home/www/www.foo.bar/logs/php-fpm.pid`
>>
>> > Which will only kill all child processes of that specific pool but not the
>> > "master process" of that pool itself, right?
>>
>> yes
>>
>>
>>
>> >> The same forwww.domain.comby using :
>> >> kill `cat /home/www/www.domain.com/logs/php-fpm.pid`
>>
>> >> This will allow processes to restart a pool, to reload php.ini content
>> >> but it WON'T reload any FPM related conf.
>>
>> > As i understand, it WILL reload pool specific php.ini, ENV and other
>> > configuration values!?
>>
>> nope. It will reload the php.ini content (/usr/local/php/lib/php.ini
>> for example) but it WON'T reload anything present on the php-fpm.conf
>> (/usr/local/php/etc/php-fpm.conf). To reload the php-fpm.conf you'l
>> have to reload the master process which will restart all pool
>> processes. There is nothing to do about this.
>>
>> > If that works that easy and the fpm process recreates its child process
>> > after killing without problems - GREAT!
>>
>> it already works that easy. kill by hand all the FPM child processes
>> and you'll see that they'll be recreated by the master process. I'm
>> just proposing to note thoses PID in one file per pool to make
>> operations easier. That's all.
>>
>>
>>
>> >> what do you think ?
>>
>> >> ++ jerome
>>
>> >> 2010/8/20 Thomas Fritz <fritz...@gmail.com>:
>> >> > Hi!
>> >> > If such a graceful reload/restart does not disrupt any pool, such a
>> >> > graceful
>> >> > reload/restart of configuration changes in a pool (and i think thats
>> >> > most
>> >> > common use case) is more than sufficient.
>> >> > But in case a pool hangs ( i do not know if it possible, if it can
>> >> > happen
>> >> > and when how php-fpm handles this - i do not know anything from the
>> >> > technical design behind php-fpm) a restart of that specific pool would
>> >> > be
>> >> > better. Or is it possible to check for such cases in the graceful
>> >> > restart
>> >> > option?
>> >> > But anyway. php-fpm is great and i am really happy that they included it
>> >> > in
>> >> > 5.3.3 than 5.4! Thank you very much for your hard work!
>> >> > Kind regards
>>
>> >> > ---
>> >> > Thomas FRITZ
>> >> > web http://fritzthomas.com
>> >> > twitter http://twitter.com/thomasf
>>
>> >> > 2010/8/19 Jérôme Loyet <m...@fatbsd.com>
>>
>> >> >> 2010/8/19 iain wright <iainw...@usc.edu>:
>> >> >> > Agreed, we are close to deploying 8 CMS sites on a new server each
>> >> >> > running
>> >> >> > in its own php-fpm pool, seems silly to have to restart all of them
>> >> >> > if
>> >> >> > something happened to 1 site.
>>
>> >> >> it's definetely not possible by design. If you really want to separate
>> >> >> each site, launch 8 instances of FPM with only one pool each. But it
>> >> >> would not be that *beautiful*. With the include feature on the fpm
>> >> >> conf file, you can share values between differents FPM conf files.
>>
>> >> >> > That being said, phpfpm has worked like a charm and I love it.
>>
>> >> >> Love to hear that :)
>>
>> >> >> > Iain Wright
>> >> >> > LAN Administrator - CBIS
>> >> >> > USC Clinical Translational Science Institute
>>
>> >> >> > On Thu, Aug 19, 2010 at 8:43 AM, Diemuzi <diem...@gmail.com> wrote:
>>
>> >> >> >> Changing per pool values is a big part for me. I would rather
>> >> >> >> restart
>> >> >> >> only the pool I changed the values in so that I do not possibly
>> >> >> >> disrupt the other pools running.
>>
>> >> >> >> On Jul 30, 5:38 pm, Gints Murāns <gints.mur...@gmail.com> wrote:
>> >> >> >> > What happens with other pools when one of the pools have gateway
>> >> >> >> > timeout? I mean when there is some long script running, that takes
>> >> >> >> > up
>> >> >> >> > all the pool resources. I guess that would have to affect other
>> >> >> >> > pools.
>> >> >> >> > So I want to restart this one, why should I those others?
>> >> >> >> > Especially
>> >> >> >> > when there is a lot of webpages and a lot of pools.
>>
>> >> >> >> > On Jul 26, 9:35 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
>>
>> >> >> >> > > 2010/7/26 GM <g...@gm.lv>:
>>
>> >> >> >> > > > I would like to know that too.
>>
>> >> >> >> > > can you describe why you want that ? what is the need ? Before
>> >> >> >> > > coding
>> >> >> >> > > anything I'd like to be sure the solution is the right one.
>>
>> >> >> >> > > > On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com> wrote:
>> >> >> >> > > >> I think i can remember that i have somewhere read about that
>> >> >> >> > > >> feature or
>> >> >> >> > > >> feature wish!
>> >> >> >> > > >> Is it possible to restart only a specific pool and not the
>> >> >> >> > > >> whole
>> >> >> >> > > >> FPM? Is it
>> >> >> >> > > >> planned to support that?
>>
>> >> >> >> > > >> Thanks
>>
>> >> >> >> > > >> Kind regards
>>
>> >> >> >> > > >> ---
>>
>> >> >> >> > > >> *Thomas FRITZ*
>> >> >> >> > > >> *web*http://fritzthomas.com
>> >> >> >> > > >> *twitter*http://twitter.com/thomasf
>>
>> > --
>>
>> > ---
>> > Thomas FRITZ
>> > webhttp://fritzthomas.com
>> > twitterhttp://twitter.com/thomasf
>>
>>
>
Thomas Fritz
Re: Seperate restarting of a pool!?
August 20, 2010 08:00AM
2010/8/20 Jérôme Loyet <ml@fatbsd.com>

> 2010/8/20 Gints Murāns <gints.murans@gmail.com>:
> > Yes, I agree that it would solve it. I have a startup script already
> > in mind for this :) I mean command line could look something like
> > this: "/etc/init.d/php-fpm restart-pool www"
>
> I also have in mind changing the processes label. Because every
> process are labeled "php-fpm opt_args" in ps or top outpout. I'd like
> to have
>
> php-fpm: master process
> php-fpm: pool www.foo.bar
> php-fpm: pool www.foo.bar
> php-fpm: pool www.foo.bar
> php-fpm: pool www.domain.com
> php-fpm: pool www.domain.com
> php-fpm: pool www.domain.com
>
>
+1 Great!


> it'll help and will be more clear
>
> >
> > On Aug 20, 11:15 am, Jérôme Loyet <m...@fatbsd.com> wrote:
> >> 2010/8/20 Thomas Fritz <fritz...@gmail.com>:
> >>
> >>
> >>
> >>
> >>
> >> > 2010/8/20 Jérôme Loyet <m...@fatbsd.com>
> >>
> >> >> Hi,
> >>
> >> >> I was thinking about all that.
> >>
> >> >> There is maybe a feature which can help in this case.
> >>
> >> >> what if there is a "pid" directive per pool. In this case FPM will
> >> >> write in this PID file each process PIDs dedicated to a pool. So
> that,
> >> >> if you want to restart a pool, you'll be able to do it using the kill
> >> >> command.
> >>
> >> >> [global]
> >> >> pid=/var/run/php-fpm.pid ; master process PID
> >> >> ...
> >> >> [www.foo.bar]
> >> >> pid=/home/www/www.foo.bar/logs/php-fpm.pid
> >> >> ...
> >> >> [www.domain.com]
> >> >> pid=/home/www/www.domain.com/logs/php-fpm.pid
> >> >> ...
> >>
> >> >> In /var/run/php-fpm.pid, you'll have only the master process PID.
> >> >> You'll be able to stop/reload everything as usual. Nothing change
> >> >> here.
> >>
> >> > As i understand you: There is a php-fpm reload which only reloads the
> >> > configuration files - does a graceful restart?
> >>
> >> yes. man php-fpm tells you about this:
> >>
> >> Once started, php-fpm then responds to several POSIX signals:
> >>
> >> SIGINT,SIGTERM immediate termination
> >> SIGQUIT graceful stop
> >> SIGUSR1 re-open log file
> >> SIGUSR2 graceful reload of all workers + reload of fpm
> conf/binary
> >>
> >>
> >>
> >> >> In /home/www/www.foo.bar/logs/php-fpm.pid, you'll have only the PIDs
> >> >> of the processes dedicated to the poolwww.foo.barusing :
> >>
> >> >> kill `cat /home/www/www.foo.bar/logs/php-fpm.pid`
> >>
> >> > Which will only kill all child processes of that specific pool but not
> the
> >> > "master process" of that pool itself, right?
> >>
> >> yes
> >>
> >>
> >>
> >> >> The same forwww.domain.comby using :
> >> >> kill `cat /home/www/www.domain.com/logs/php-fpm.pid`
> >>
> >> >> This will allow processes to restart a pool, to reload php.ini
> content
> >> >> but it WON'T reload any FPM related conf.
> >>
> >> > As i understand, it WILL reload pool specific php.ini, ENV and other
> >> > configuration values!?
> >>
> >> nope. It will reload the php.ini content (/usr/local/php/lib/php.ini
> >> for example) but it WON'T reload anything present on the php-fpm.conf
> >> (/usr/local/php/etc/php-fpm.conf). To reload the php-fpm.conf you'l
> >> have to reload the master process which will restart all pool
> >> processes. There is nothing to do about this.
> >>
> >> > If that works that easy and the fpm process recreates its child
> process
> >> > after killing without problems - GREAT!
> >>
> >> it already works that easy. kill by hand all the FPM child processes
> >> and you'll see that they'll be recreated by the master process. I'm
> >> just proposing to note thoses PID in one file per pool to make
> >> operations easier. That's all.
> >>
> >>
> >>
> >> >> what do you think ?
> >>
> >> >> ++ jerome
> >>
> >> >> 2010/8/20 Thomas Fritz <fritz...@gmail.com>:
> >> >> > Hi!
> >> >> > If such a graceful reload/restart does not disrupt any pool, such a
> >> >> > graceful
> >> >> > reload/restart of configuration changes in a pool (and i think
> thats
> >> >> > most
> >> >> > common use case) is more than sufficient.
> >> >> > But in case a pool hangs ( i do not know if it possible, if it can
> >> >> > happen
> >> >> > and when how php-fpm handles this - i do not know anything from the
> >> >> > technical design behind php-fpm) a restart of that specific pool
> would
> >> >> > be
> >> >> > better. Or is it possible to check for such cases in the graceful
> >> >> > restart
> >> >> > option?
> >> >> > But anyway. php-fpm is great and i am really happy that they
> included it
> >> >> > in
> >> >> > 5.3.3 than 5.4! Thank you very much for your hard work!
> >> >> > Kind regards
> >>
> >> >> > ---
> >> >> > Thomas FRITZ
> >> >> > web http://fritzthomas.com
> >> >> > twitter http://twitter.com/thomasf
> >>
> >> >> > 2010/8/19 Jérôme Loyet <m...@fatbsd.com>
> >>
> >> >> >> 2010/8/19 iain wright <iainw...@usc.edu>:
> >> >> >> > Agreed, we are close to deploying 8 CMS sites on a new server
> each
> >> >> >> > running
> >> >> >> > in its own php-fpm pool, seems silly to have to restart all of
> them
> >> >> >> > if
> >> >> >> > something happened to 1 site.
> >>
> >> >> >> it's definetely not possible by design. If you really want to
> separate
> >> >> >> each site, launch 8 instances of FPM with only one pool each. But
> it
> >> >> >> would not be that *beautiful*. With the include feature on the fpm
> >> >> >> conf file, you can share values between differents FPM conf files.
> >>
> >> >> >> > That being said, phpfpm has worked like a charm and I love it.
> >>
> >> >> >> Love to hear that :)
> >>
> >> >> >> > Iain Wright
> >> >> >> > LAN Administrator - CBIS
> >> >> >> > USC Clinical Translational Science Institute
> >>
> >> >> >> > On Thu, Aug 19, 2010 at 8:43 AM, Diemuzi <diem...@gmail.com>
> wrote:
> >>
> >> >> >> >> Changing per pool values is a big part for me. I would rather
> >> >> >> >> restart
> >> >> >> >> only the pool I changed the values in so that I do not possibly
> >> >> >> >> disrupt the other pools running.
> >>
> >> >> >> >> On Jul 30, 5:38 pm, Gints Murāns <gints.mur...@gmail.com>
> wrote:
> >> >> >> >> > What happens with other pools when one of the pools have
> gateway
> >> >> >> >> > timeout? I mean when there is some long script running, that
> takes
> >> >> >> >> > up
> >> >> >> >> > all the pool resources. I guess that would have to affect
> other
> >> >> >> >> > pools.
> >> >> >> >> > So I want to restart this one, why should I those others?
> >> >> >> >> > Especially
> >> >> >> >> > when there is a lot of webpages and a lot of pools.
> >>
> >> >> >> >> > On Jul 26, 9:35 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
> >>
> >> >> >> >> > > 2010/7/26 GM <g...@gm.lv>:
> >>
> >> >> >> >> > > > I would like to know that too.
> >>
> >> >> >> >> > > can you describe why you want that ? what is the need ?
> Before
> >> >> >> >> > > coding
> >> >> >> >> > > anything I'd like to be sure the solution is the right one.
> >>
> >> >> >> >> > > > On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail.com>
> wrote:
> >> >> >> >> > > >> I think i can remember that i have somewhere read about
> that
> >> >> >> >> > > >> feature or
> >> >> >> >> > > >> feature wish!
> >> >> >> >> > > >> Is it possible to restart only a specific pool and not
> the
> >> >> >> >> > > >> whole
> >> >> >> >> > > >> FPM? Is it
> >> >> >> >> > > >> planned to support that?
> >>
> >> >> >> >> > > >> Thanks
> >>
> >> >> >> >> > > >> Kind regards
> >>
> >> >> >> >> > > >> ---
> >>
> >> >> >> >> > > >> *Thomas FRITZ*
> >> >> >> >> > > >> *web*http://fritzthomas.com
> >> >> >> >> > > >> *twitter*http://twitter.com/thomasf
> >>
> >> > --
> >>
> >> > ---
> >> > Thomas FRITZ
> >> > webhttp://fritzthomas.com
> >> > twitterhttp://twitter.com/thomasf
> >>
> >>
> >
>



--



---

*Thomas FRITZ*
*web* http://fritzthomas.com
*twitter* http://twitter.com/thomasf
Dennis J.
Re: Seperate restarting of a pool!?
August 20, 2010 08:02AM
On 08/20/2010 10:15 AM, Jérôme Loyet wrote:
> 2010/8/20 Thomas Fritz<fritztho@gmail.com>:
>>
>> 2010/8/20 Jérôme Loyet<ml@fatbsd.com>
>>> Hi,
>>>
>>> I was thinking about all that.
>>>
>>> There is maybe a feature which can help in this case.
>>>
>>> what if there is a "pid" directive per pool. In this case FPM will
>>> write in this PID file each process PIDs dedicated to a pool. So that,
>>> if you want to restart a pool, you'll be able to do it using the kill
>>> command.
>>>
>>> [global]
>>> pid=/var/run/php-fpm.pid ; master process PID
>>> ...
>>> [www.foo.bar]
>>> pid=/home/www/www.foo.bar/logs/php-fpm.pid
>>> ...
>>> [www.domain.com]
>>> pid=/home/www/www.domain.com/logs/php-fpm.pid
>>> ...
>>>
>>> In /var/run/php-fpm.pid, you'll have only the master process PID.
>>> You'll be able to stop/reload everything as usual. Nothing change
>>> here.
>> As i understand you: There is a php-fpm reload which only reloads the
>> configuration files - does a graceful restart?
> yes. man php-fpm tells you about this:
>
> Once started, php-fpm then responds to several POSIX signals:
>
> SIGINT,SIGTERM immediate termination
> SIGQUIT graceful stop
> SIGUSR1 re-open log file
> SIGUSR2 graceful reload of all workers + reload of fpm conf/binary
>
>>> In /home/www/www.foo.bar/logs/php-fpm.pid, you'll have only the PIDs
>>> of the processes dedicated to the pool www.foo.bar using :
>>>
>>> kill `cat /home/www/www.foo.bar/logs/php-fpm.pid`
>> Which will only kill all child processes of that specific pool but not the
>> "master process" of that pool itself, right?
> yes
>
>>> The same for www.domain.com by using :
>>> kill `cat /home/www/www.domain.com/logs/php-fpm.pid`
>>>
>>> This will allow processes to restart a pool, to reload php.ini content
>>> but it WON'T reload any FPM related conf.
>> As i understand, it WILL reload pool specific php.ini, ENV and other
>> configuration values!?
> nope. It will reload the php.ini content (/usr/local/php/lib/php.ini
> for example) but it WON'T reload anything present on the php-fpm.conf
> (/usr/local/php/etc/php-fpm.conf). To reload the php-fpm.conf you'l
> have to reload the master process which will restart all pool
> processes. There is nothing to do about this.
>
>> If that works that easy and the fpm process recreates its child process
>> after killing without problems - GREAT!
> it already works that easy. kill by hand all the FPM child processes
> and you'll see that they'll be recreated by the master process. I'm
> just proposing to note thoses PID in one file per pool to make
> operations easier. That's all.
>
This sounds racy. Are you going to update the pid file every time a process
dies and a replacement is created? What if I try to do the "kill
<worker-pid-file>" at the wrong moment? If I execute this after a new
process is created but before the pid file has been updated then this
process potentially still runs a different config.
This could lead to very subtle issues that are almost impossible to
reproduce and track down.

A better way would be to use the same approach but implement this killing
of processes in php-fpm itself. That way php-fpm could suspend the creation
of new process, kill the workers and then enable the creation of new
processes again (similar to what preempt_disable() and preempt_enable() do
in the kernel). e.g.:

disable_worker_forking();
kill_pool_workers();
reload_config();
enable_worker_forking();

Regards,
Dennis
Jérôme Loyet
Re: Seperate restarting of a pool!?
August 20, 2010 01:40PM
2010/8/20 Thomas Fritz <fritztho@gmail.com>:
>
>
> 2010/8/20 Jérôme Loyet <ml@fatbsd.com>
>>
>> 2010/8/20 Gints Murāns <gints.murans@gmail.com>:
>> > Yes, I agree that it would solve it. I have a startup script already
>> > in mind for this :) I mean command line could look something like
>> > this: "/etc/init.d/php-fpm restart-pool www"
>>
>> I also have in mind changing the processes label. Because every
>> process are labeled "php-fpm opt_args" in ps or top outpout. I'd like
>> to have
>>
>> php-fpm: master process
>> php-fpm: pool www.foo.bar
>> php-fpm: pool www.foo.bar
>> php-fpm: pool www.foo.bar
>> php-fpm: pool www.domain.com
>> php-fpm: pool www.domain.com
>> php-fpm: pool www.domain.com
>>
>
> +1 Great!

If some of you can try the following path, it would be great. It
changes the process title according to their type:

http://bugs.php.net/52660

PS output sample:
21744 pts/3 S+ 0:00 php-fpm: master process
(/usr/local/php-trunk/etc/php-fpm.conf)
21745 pts/3 S+ 0:00 php-fpm: pool www_chroot
21746 pts/3 S+ 0:00 php-fpm: pool www_direct

++ Jerome

>
>>
>> it'll help and will be more clear
>>
>> >
>> > On Aug 20, 11:15 am, Jérôme Loyet <m...@fatbsd.com> wrote:
>> >> 2010/8/20 Thomas Fritz <fritz...@gmail.com>:
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> > 2010/8/20 Jérôme Loyet <m...@fatbsd.com>
>> >>
>> >> >> Hi,
>> >>
>> >> >> I was thinking about all that.
>> >>
>> >> >> There is maybe a feature which can help in this case.
>> >>
>> >> >> what if there is a "pid" directive per pool. In this case FPM will
>> >> >> write in this PID file each process PIDs dedicated to a pool. So
>> >> >> that,
>> >> >> if you want to restart a pool, you'll be able to do it using the
>> >> >> kill
>> >> >> command.
>> >>
>> >> >> [global]
>> >> >> pid=/var/run/php-fpm.pid ; master process PID
>> >> >> ...
>> >> >> [www.foo.bar]
>> >> >> pid=/home/www/www.foo.bar/logs/php-fpm.pid
>> >> >> ...
>> >> >> [www.domain.com]
>> >> >> pid=/home/www/www.domain.com/logs/php-fpm.pid
>> >> >> ...
>> >>
>> >> >> In /var/run/php-fpm.pid, you'll have only the master process PID.
>> >> >> You'll be able to stop/reload everything as usual. Nothing change
>> >> >> here.
>> >>
>> >> > As i understand you: There is a php-fpm reload which only reloads the
>> >> > configuration files - does a graceful restart?
>> >>
>> >> yes. man php-fpm tells you about this:
>> >>
>> >> Once started, php-fpm then responds to several POSIX signals:
>> >>
>> >>  SIGINT,SIGTERM      immediate termination
>> >>  SIGQUIT             graceful stop
>> >>  SIGUSR1             re-open log file
>> >>  SIGUSR2             graceful reload of all workers + reload of fpm
>> >> conf/binary
>> >>
>> >>
>> >>
>> >> >> In /home/www/www.foo.bar/logs/php-fpm.pid, you'll have only the PIDs
>> >> >> of the processes dedicated to the poolwww.foo.barusing :
>> >>
>> >> >> kill `cat /home/www/www.foo.bar/logs/php-fpm.pid`
>> >>
>> >> > Which will only kill all child processes of that specific pool but
>> >> > not the
>> >> > "master process" of that pool itself, right?
>> >>
>> >> yes
>> >>
>> >>
>> >>
>> >> >> The same forwww.domain.comby using :
>> >> >> kill `cat /home/www/www.domain.com/logs/php-fpm.pid`
>> >>
>> >> >> This will allow processes to restart a pool, to reload php.ini
>> >> >> content
>> >> >> but it WON'T reload any FPM related conf.
>> >>
>> >> > As i understand, it WILL reload pool specific php.ini, ENV and other
>> >> > configuration values!?
>> >>
>> >> nope. It will reload the php.ini content (/usr/local/php/lib/php.ini
>> >> for example) but it WON'T reload anything present on the php-fpm.conf
>> >> (/usr/local/php/etc/php-fpm.conf). To reload the php-fpm.conf you'l
>> >> have to reload the master process which will restart all pool
>> >> processes. There is nothing to do about this.
>> >>
>> >> > If that works that easy and the fpm process recreates its child
>> >> > process
>> >> > after killing without problems - GREAT!
>> >>
>> >> it already works that easy. kill by hand all the FPM child processes
>> >> and you'll see that they'll be recreated by the master process. I'm
>> >> just proposing to note thoses PID in one file per pool to make
>> >> operations easier. That's all.
>> >>
>> >>
>> >>
>> >> >> what do you think ?
>> >>
>> >> >> ++ jerome
>> >>
>> >> >> 2010/8/20 Thomas Fritz <fritz...@gmail.com>:
>> >> >> > Hi!
>> >> >> > If such a graceful reload/restart does not disrupt any pool, such
>> >> >> > a
>> >> >> > graceful
>> >> >> > reload/restart of configuration changes in a pool (and i think
>> >> >> > thats
>> >> >> > most
>> >> >> > common use case) is more than sufficient.
>> >> >> > But in case a pool hangs ( i do not know if it possible, if it can
>> >> >> > happen
>> >> >> > and when how php-fpm handles this - i do not know anything from
>> >> >> > the
>> >> >> > technical design behind php-fpm) a restart of that specific pool
>> >> >> > would
>> >> >> > be
>> >> >> > better. Or is it possible to check for such cases in the graceful
>> >> >> > restart
>> >> >> > option?
>> >> >> > But anyway. php-fpm is great and i am really happy that they
>> >> >> > included it
>> >> >> > in
>> >> >> > 5.3.3 than 5.4! Thank you very much for your hard work!
>> >> >> > Kind regards
>> >>
>> >> >> > ---
>> >> >> > Thomas FRITZ
>> >> >> > web http://fritzthomas.com
>> >> >> > twitter http://twitter.com/thomasf
>> >>
>> >> >> > 2010/8/19 Jérôme Loyet <m...@fatbsd.com>
>> >>
>> >> >> >> 2010/8/19 iain wright <iainw...@usc.edu>:
>> >> >> >> > Agreed, we are close to deploying 8 CMS sites on a new server
>> >> >> >> > each
>> >> >> >> > running
>> >> >> >> > in its own php-fpm pool, seems silly to have to restart all of
>> >> >> >> > them
>> >> >> >> > if
>> >> >> >> > something happened to 1 site.
>> >>
>> >> >> >> it's definetely not possible by design. If you really want to
>> >> >> >> separate
>> >> >> >> each site, launch 8 instances of FPM with only one pool each. But
>> >> >> >> it
>> >> >> >> would not be that *beautiful*. With the include feature on the
>> >> >> >> fpm
>> >> >> >> conf file, you can share values between differents FPM conf
>> >> >> >> files.
>> >>
>> >> >> >> > That being said, phpfpm has worked like a charm and I love it..
>> >>
>> >> >> >> Love to hear that :)
>> >>
>> >> >> >> > Iain Wright
>> >> >> >> > LAN Administrator - CBIS
>> >> >> >> > USC Clinical Translational Science Institute
>> >>
>> >> >> >> > On Thu, Aug 19, 2010 at 8:43 AM, Diemuzi <diem...@gmail.com>
>> >> >> >> > wrote:
>> >>
>> >> >> >> >> Changing per pool values is a big part for me. I would rather
>> >> >> >> >> restart
>> >> >> >> >> only the pool I changed the values in so that I do not
>> >> >> >> >> possibly
>> >> >> >> >> disrupt the other pools running.
>> >>
>> >> >> >> >> On Jul 30, 5:38 pm, Gints Murāns <gints.mur...@gmail.com>
>> >> >> >> >> wrote:
>> >> >> >> >> > What happens with other pools when one of the pools have
>> >> >> >> >> > gateway
>> >> >> >> >> > timeout? I mean when there is some long script running, that
>> >> >> >> >> > takes
>> >> >> >> >> > up
>> >> >> >> >> > all the pool resources. I guess that would have to affect
>> >> >> >> >> > other
>> >> >> >> >> > pools.
>> >> >> >> >> > So I want to restart this one, why should I those others?
>> >> >> >> >> > Especially
>> >> >> >> >> > when there is a lot of webpages and a lot of pools.
>> >>
>> >> >> >> >> > On Jul 26, 9:35 pm, Jérôme Loyet <m...@fatbsd.com> wrote:
>> >>
>> >> >> >> >> > > 2010/7/26 GM <g...@gm.lv>:
>> >>
>> >> >> >> >> > > > I would like to know that too.
>> >>
>> >> >> >> >> > > can you describe why you want that ? what is the need ?
>> >> >> >> >> > > Before
>> >> >> >> >> > > coding
>> >> >> >> >> > > anything I'd like to be sure the solution is the right
>> >> >> >> >> > > one.
>> >>
>> >> >> >> >> > > > On Jul 25, 12:44 pm, Thomas Fritz <fritz...@gmail..com>
>> >> >> >> >> > > > wrote:
>> >> >> >> >> > > >> I think i can remember that i have somewhere read about
>> >> >> >> >> > > >> that
>> >> >> >> >> > > >> feature or
>> >> >> >> >> > > >> feature wish!
>> >> >> >> >> > > >> Is it possible to restart only a specific pool and not
>> >> >> >> >> > > >> the
>> >> >> >> >> > > >> whole
>> >> >> >> >> > > >> FPM? Is it
>> >> >> >> >> > > >> planned to support that?
>> >>
>> >> >> >> >> > > >> Thanks
>> >>
>> >> >> >> >> > > >> Kind regards
>> >>
>> >> >> >> >> > > >> ---
>> >>
>> >> >> >> >> > > >> *Thomas FRITZ*
>> >> >> >> >> > > >> *web*http://fritzthomas.com
>> >> >> >> >> > > >> *twitter*http://twitter.com/thomasf
>> >>
>> >> > --
>> >>
>> >> > ---
>> >> > Thomas FRITZ
>> >> > webhttp://fritzthomas.com
>> >> > twitterhttp://twitter.com/thomasf
>> >>
>> >>
>> >
>
>
>
> --
>
>
>
> ---
> Thomas FRITZ
> web http://fritzthomas.com
> twitter http://twitter.com/thomasf
>
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 253
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