I put all my Pylons and Quixote apps under Supervisord, with Apache
mod_proxy. I want to try nginx when I have a chance.
Some people prefer mod_wsgi because it runs everything under Apache
processes, but I like being able to "supervisor stop" and "supervisor
start" individual applications for maintenance and debugging, plus
seeing them under their own names in the ps listing.
--
Mike Orr <slugg...@gmail.com>
--
Mike Orr <slugg...@gmail.com>
You can do three things:
- start supervisord using init by adding an entry in /etc/inittab. This
requires root and is for the very paranoid: even if supervisord dies
(which never happens) it will be restarted.
- use an init script to start supervisord at system boot. Requires root.
- Start supervisord using an @reboot crontab entry in a normal account.
Does not require root. Works on all Linux distributions, I'm not sure
is other cron implementation support this.
The last one is my preferred method: it is trivial to setup and can be
done by any normal user.
Wichert.
--
Wichert Akkerman <wic...@wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
Wichert.
--
Wichert Akkerman <wic...@wiggy.net> It is simple to make things.
http://www.wiggy.net/ It is hard to make things simple.
Graham
> See alsohttp://unblog.developers.org.ua/2009/03/nginx.html
> Anyway, I switched back to paster (cherrypy WSGI) but I used monit instead
> of supervisor (I already used it to monitor apache and other system
> resources and it was trivial task to add paster monitor checks). And I also
> set up nginx as a front-proxy.
> And it all works amazingly good right now.
>
> I run three identical paster servers which are proxied by nginx, using
> round-robin load balancing. nginx also serves all static content and works
> as a proxy to apache. Apache now has far fewer modules, mainly mod_php for
> our PHP pages.
>
>
> If you are interested I guess I could post relevant configs here or to
> Pylons wiki
>
> --
> Max.Ischenko // twitter.com/maxua
Don't know if that was related to zombie issue you asked about on
mod_wsgi list back in November or not. You were asked to supply some
more specific information but you never responded. Bit hard to solve
what ever problem it was when you don't followup about it. -(
This script looks like it's for Red Hat; here's one for Ubuntu. Start
works and stop works, but restart doesn't for some reason, so I have
to start it again after restarting.
As for supervisord spontaneously crashing and needing to be
relaunched; I've never seen it happen.
By the way, the easiest way to make an init script is to copy an
existing minimal one.
===
#! /bin/bash -e
# /etc/init.d/supervisor: start and stop the Supervisor daemon manager
#SUPERVISORD=/usr/local/bin/supervisord
#SUPERVISORCTL=/usr/local/bin/supervisorctl
SUPERVISORD=/usr/local/venv-supervisor/bin/supervisord
SUPERVISORCTL=/usr/local/venv-supervisor/bin/supervisorctl
PIDFILE=/var/run/supervisord.pid
OPTS="-c /etc/supervisord.conf"
test -x $SUPERVISORD || exit 0
. /lib/lsb/init-functions
export PATH="${PATH:+$PATH:}/usr/local/bin:/usr/sbin:/sbin"
start () {
log_begin_msg "Starting Supervisor daemon manager..."
$SUPERVISORD $OPTS || log_end_msg 1
log_end_msg 0
}
stop () {
log_begin_msg "Stopping Supervisor daemon manager..."
$SUPERVISORCTL shutdown || log_end_msg 1
log_end_msg 0
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload|force-reload)
stop
start
;;
esac
exit 0
===
--
Mike Orr <slugg...@gmail.com>
This script looks like it's for Red Hat; here's one for Ubuntu. Start
On 3/28/09, Jose Galvez <jj.g...@gmail.com> wrote:
> Here is my supervisord init script. not sure if its the best but its
> working
works and stop works, but restart doesn't for some reason, so I have
to start it again after restarting.
On Mar 30, 7:17 am, Jose Galvez <jj.gal...@gmail.com> wrote:Wow this discussion has been really great, I've learned quite a bit just following the different threads. Like I said I think there is room in the wiki for us to post better real world howto's with end to end config files. For example I could post my: 1) init script for supervisord (although I think the one Mike posted is better then mine so I'll most likely edit mine 2) the section in my supervisord.conf file 3) the sections in my apache conf files I would like to see the same thing from Max on how he did it with nginx and monit, and how Graham is serving his stuff with mod_wsgi. As mentioned in one of the posts mod_wsgi could use some better documentation and this might be a good way to do that.Do you mean better mod_wsgi documentation as part of the Pylons documentation, or that mod_wsgi itself needs better/more documentation?
well quite a discussion. just to add & share my experience of
developing on pylons & deploying it.
My requirement was to host multiple pylons application, on a single
server. so running each app on paster daemon & proxy to it via either
apache or nginx was not a very optimal solution for me.
So i tried using apache 2+ mod_wsgi, which is good & works well, but
it's a bit slow for now. i hope that in future it's performance will
increase more.
Then i tried nginx+mod_wsgi, which is great in terms of performance,
speed & scalability. You can just keep on adding different pylons
webapps as virtual hosts to nginx & everything works. so far it has
been great.
Our product is a website management system, ( you can say a CMS sort
of app ). I"ve deployed the nginx + mod_wsgi on our new VPS, and will
be going live any day.
--
Regards,
Arun Tomar
blog: http://linuxguy.in
website: http://www.solutionenterprises.co.in
Everyone is running 3.0a6 as far as I know.
I second that. I think Graham has written a ton of good stuff and has
provided first rate support on mailing lists, but ... for cases where
the user reading is not nears as experienced as the author, the docs are
a bit overwhelming technically. I've found that when I'm wading through
stuff that's over my head, lots of simple examples are my favourite bit,
even if they seem redundant and pedantic to the author. Rest assured,
someone needs them! ;-)
Iain
well if supervisord is not supported in python2.6 then I may have to switch to something else which would be a real bummer I really liked the way supervisor does things. In any event I think I'll take a look at runit just to get acquainted with it