[uWSGI] restart uWSGI processes

Yann Malet yann.malet at gmail.com
Mon Jan 4 22:54:30 CET 2010


Roberto,

I don't like much the touch technic. My preferred method would be to be able
to do it from cherokee-admin. This would be very neat but i understand that
uWSGI works with other webserver so we should have another way to get this
info.

So basically what we need is to get the list of master processes running on
a computer. I see several options :

*  a uwsgi command that returns the list of uwsgi master processes on the
computer.
* a uwsgi mode "--reload" where uwsgi reload an app each time you touch the
config module or that one of the python file change.

I am not yet sure what solution would be the best. I would be glad to hear
from you what you envision.

Thank you help.
Regards
--yml


On Mon, Jan 4, 2010 at 3:46 PM, Roberto De Ioris <roberto at unbit.it> wrote:

>
> > How do you tell which one is the master process ?
>
>
>
> A hack could be:
>
> ps eo comm,pid,ppid,sid
>
> then choose the one with the same sid and ppid.
>
> If you run uWSGI as a daemon you can simply choose the one with '1' as the
> ppid.
>
> A more elegant way is to read the uWSGI log (it prints the various pids).
>
> The "right" way (waiting for the 'remote management' targeted at 0.9.5)
> would be writing a pidfile at server startup that you can use as source
> for your scripts. i will add it tomorrow.
>
> What do you think about the "phusion passenger" way of reloading processes
> simply writing (or touching) a file ? I find it a bit "in-elegant" but
> probably could be useful for some environments.
>
> --
> Roberto De Ioris
> http://unbit.it
>
>
> --
>
> _______________________________________________
> uWSGI mailing list
> uWSGI at lists.unbit.it
> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.unbit.it/pipermail/uwsgi/attachments/20100104/26f29d62/attachment.htm 


More information about the uWSGI mailing list