On Mon, June 6, 2011 04:28, Roger Hoover wrote:
>>> 1. can dynamically start fcgi processes to meet demand
>>>
>
> if you're using nginx, there's a plugin that i believe will do this
>
> http://labs.frickle.com/nginx_ngx_supervisord/

Looks interesting.  The documentation (at least what I see on the site) is
really quite sparse, though.  Can you give me an example configuration?

>>> 2. kills each process after it has served a specified number of
>>> requests
>
> supervisord itself is not aware at all of requests (it just forks fcgi
> processes with an open socket) but you can certainly implement this
> pattern with supervisord.  you can probably reuse the same code that exits
> after a certain number of requests b/c that piece of the equation
> shouldn't have any dependency on how the process was forked.  for our own
> system, we used a special exit code when processes exited on purpose (b/c
> they completed a certain number of requests).  Then in our supervisord
> config, we listed that exit code as "expected" so that it can be
> distinguished from unexpected errors that cause the process to die.

You mean code my fcgi process to exit after serving the determined number
of requests?  Where is that code for re-use?  In the django management
command?  Also, what difference does it make if supervisord knows that
this is "expected?"  Wouldn't I want it to spawn a new process in any
case?

That frickle project also mentions "Dynamic rotation" of fcgi processes. 
Does that address my second interest as well?  As noted, the documentation
 (for frickle, not supervisor) really seems quite meager.  I would love to
see more complete supervisord/frickle examples for achieving these goals.

Thanks for your help.

regards,
Aryeh Leib Taurog


>> ---------- Forwarded message ----------
>> From: Aryeh Leib Taurog <v...@aryehleib.com>
>> To: supervisor-users@lists.supervisord.org
>> Date: Sun, 05 Jun 2011 21:20:35 +0300
>> Subject: Limit number of fcgi requests each process serves
>> Hi,
>>
>>
>> I have a django app and I'm looking into using fcgi-program under
>> supervisord to manage it.  The advantage that the standard "manage.py
>> runfcgi" approach provided by django/flup seems to have over supervisor
>> is that it
>>
>> 1. can dynamically start fcgi processes to meet demand
>> 2. kills each process after it has served a specified number of requests
>>
>>
>> Is there any way to do this with supervisor?  I'm particularly
>> interested in the second option.
>>
>> Thanks,
>> Aryeh Leib Taurog
>>



_______________________________________________
Supervisor-users mailing list
Supervisor-users@lists.supervisord.org
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to