supervisor questions

20 views
Skip to first unread message

Shannon -jj Behrens

unread,
Jul 7, 2008, 7:37:09 PM7/7/08
to pylons-...@googlegroups.com, Max Ischenko, Mike Orr
Hi,

I'm looking at http://wiki.pylonshq.com/display/pylonscookbook/Monitor+Pylons+application+with+supervisord.
I have a few questions:

1. Why does it use a manually created server.py instead of using
paster like normal?

2. Does anyone have an rc script to start supervisor under Ubuntu?

3. Is anyone doing any fancy log rotation or are the defaults reasonable?

Thanks,
-jj

--
It's a walled garden, but the flowers sure are lovely!
http://jjinux.blogspot.com/

Jonathan Vanasco

unread,
Jul 7, 2008, 8:17:29 PM7/7/08
to pylons-discuss
this is what i use for pylons under monit

http://pylonshq.com/pasties/864

its ridiculously dumb, and should be editable to Ubuntu easily

i dislike how each distro handles starting stuff at reboot
differently, so just put stuff in an @reboot line in crontabs . that
works on every *nix and *bsd

Mike Orr

unread,
Jul 7, 2008, 9:21:36 PM7/7/08
to pylons-...@googlegroups.com
On Mon, Jul 7, 2008 at 4:37 PM, Shannon -jj Behrens <jji...@gmail.com> wrote:
> Hi,
>
> I'm looking at http://wiki.pylonshq.com/display/pylonscookbook/Monitor+Pylons+application+with+supervisord.
> I have a few questions:
>
> 1. Why does it use a manually created server.py instead of using
> paster like normal?
>
> 2. Does anyone have an rc script to start supervisor under Ubuntu?
>
> 3. Is anyone doing any fancy log rotation or are the defaults reasonable?

The article is way out of date. I've updated it for Supervisor 3.0a6.
Yes, you can use "paster serve" like normal, and also virtualenv.
I've attached an Ubuntu RC script to the article. I haven't done
fancy log rotation but there are options for it.

--
Mike Orr <slugg...@gmail.com>

Ian Bicking

unread,
Jul 7, 2008, 10:53:14 PM7/7/08
to pylons-...@googlegroups.com, supervis...@supervisord.org, Max Ischenko, Mike Orr

Huh... I'm getting a 404...?

> I have a few questions:
>
> 1. Why does it use a manually created server.py instead of using
> paster like normal?

I use paster serve (no --reload, --monitor, --daemon, any of which would
mess it up).

> 2. Does anyone have an rc script to start supervisor under Ubuntu?

Huh, actually no. It did occur to me that supervisor should ship with
such a thing. Incidentally we use a per-site supervisord.

> 3. Is anyone doing any fancy log rotation or are the defaults reasonable?

The defaults have seemed reasonable to me (though there's no cleanup or
compression AFAIK, just rotation).

--
Ian Bicking : ia...@colorstudy.com : http://blog.ianbicking.org

Ian Bicking

unread,
Jul 7, 2008, 10:57:29 PM7/7/08
to pylons-...@googlegroups.com, supervis...@supervisord.org, Max Ischenko, Mike Orr
Ian Bicking wrote:
>> 1. Why does it use a manually created server.py instead of using
>> paster like normal?
>
> I use paster serve (no --reload, --monitor, --daemon, any of which would
> mess it up).

Incidentally, one thing I don't think is all that well explained (at
least in the supervisor docs), is that shell scripts must end with:

exec paster serve production.ini

So, if you want a shell script (e.g., to setup the environment) you have
to be sure to use "exec" at the end; this makes paster replace the shell
process.

Wichert Akkerman

unread,
Jul 8, 2008, 3:13:14 AM7/8/08
to Shannon -jj Behrens, pylons-...@googlegroups.com, Max Ischenko, Mike Orr
Previously Shannon -jj Behrens wrote:
>
> Hi,
>
> I'm looking at http://wiki.pylonshq.com/display/pylonscookbook/Monitor+Pylons+application+with+supervisord.
> I have a few questions:
>
> 1. Why does it use a manually created server.py instead of using
> paster like normal?

There is no need to.

> 2. Does anyone have an rc script to start supervisor under Ubuntu?

I've started to run supervisord from init so that init will restart
supervisord if it dies. I've never seen supervisord actually die but
better safe than sorry. This is quite trivial to do with a single extra
line in /etc/inittab. Here is an example from one of my deployments:

# Start supervisord, which manages the Varnish proxy server
plne:2345:respawn:/srv/proxy/bin/supervisord --nodaemon -c /srv/proxy/etc/supervisord.conf

Wichert.

--
Wichert Akkerman <wic...@wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.

Shannon -jj Behrens

unread,
Jul 8, 2008, 7:22:10 PM7/8/08
to pylons-...@googlegroups.com, Max Ischenko, Mike Orr
Thanks for all the advice guys.

Shannon -jj Behrens

unread,
Jul 9, 2008, 2:50:26 PM7/9/08
to pylons-...@googlegroups.com
On Mon, Jul 7, 2008 at 4:37 PM, Shannon -jj Behrens <jji...@gmail.com> wrote:
> Hi,
>
> I'm looking at http://wiki.pylonshq.com/display/pylonscookbook/Monitor+Pylons+application+with+supervisord.
> I have a few questions:
>
> 1. Why does it use a manually created server.py instead of using
> paster like normal?
>
> 2. Does anyone have an rc script to start supervisor under Ubuntu?
>
> 3. Is anyone doing any fancy log rotation or are the defaults reasonable?

I decided to use runit. I blogged about how and why here:

http://jjinux.blogspot.com/2008/07/linux-running-paster-under-runit-on.html

I'm not trying to dissuade anyone else from using Supervisor.

Best Regards,

Reply all
Reply to author
Forward
0 new messages