I'm using supervisor to monitor gunicorn. I'm aware that if supervisor stops working gunicorn stops get monitored. A possible solution is to invoke from the crontab a script to monitor and eventually re/start supervisor. I'd really appreciate some example code on how a such script could be implemented. asked 30 Sep '12, 15:09 Guandalino |
You could write a small script and execute that via cron. Something like:
answered 30 Sep '12, 15:26 bmeyer71 ♦♦ Thank you. Do you suggest to monitor supervisor or getting rid of supervisor and monitor gunicorn directly (and why)?
(30 Sep '12, 15:41)
Guandalino
That's more of a personal and/or design preference. If that is what you are used to using, then there is no reason to change.
(30 Sep '12, 15:47)
bmeyer71 ♦♦
It probably a matter of memory consumption, too. I read somewhere that supervisor can eat some memory on and off.
(30 Sep '12, 15:51)
Guandalino
Yes, that will be something to consider as well. It may be a bit of trial and error to get what works best for you.
(30 Sep '12, 15:55)
bmeyer71 ♦♦
There is a Q/A on serverfault about this choice. http://serverfault.com/a/433480/54680
(30 Sep '12, 17:32)
Guandalino
|