> > 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/

> > 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.

On Sun, Jun 5, 2011 at 11:52 AM, Chris McDonough <chr...@plope.com> wrote:

> Rescued this one from the rejection bin (please subscribe to send mail
> and receive replies):.
>
>
>
> > > -------- Forwarded Message --------
> > > From: Aryeh Leib Taurog <v...@aryehleib.com>
> > > To: supervisor-users@lists.supervisord.org
> > > Subject: Limit number of fcgi requests each process serves
> > > Date: Sun, 05 Jun 2011 21:20:35 +0300
> > >
> > > 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
>
>
> ---------- 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
>
>
> ---------- Forwarded message ----------
> From: supervisor-users-requ...@lists.supervisord.org
> To:
> Date: Sun, 05 Jun 2011 18:09:01 +0000
> Subject: confirm b9770796d2f66b75d160823820b5ae3ad777a18d
> If you reply to this message, keeping the Subject: header intact,
> Mailman will discard the held message.  Do this if the message is
> spam.  If you reply to this message and include an Approved: header
> with the list password in it, the message will be approved for posting
> to the list.  The Approved: header can also appear in the first line
> of the body of the reply.
> _______________________________________________
> Supervisor-users mailing list
> Supervisor-users@lists.supervisord.org
> http://lists.supervisord.org/mailman/listinfo/supervisor-users
>
>
_______________________________________________
Supervisor-users mailing list
Supervisor-users@lists.supervisord.org
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to