1

We have a pylons web application running on a windows server 2003 machine.

There is a startup script that runs in a "dos box".

From time to time the script crashes and the server is then down. How to keep it runing / monitored?

Edit: On a linux box I would use a monitoring tool like "monit" that can check if the service responds to http requests and kills it and starts a new instance if not.

Edit2: After some research I found something now:

http://www.google.de/search?q=http%3A%2F%2Fwiki.pylonshq.com%2Fdisplay%2Fpylonscookbook%2FHow%2Bto%2Brun%2BPylons%2Bas%2Ba%2BWindows%2Bservice

(the original site is down at the present, but google cache has the page: http://wiki.pylonshq.com/display/pylonscookbook/How+to+run+Pylons+as+a+Windows+service )

I found the link on http://pylonsbook.com/en/1.1/deployment.html (2nd paragraph from the bottom)

1 Answer 1

1

Have you considered running it through IIS which can then monitor processes and restarts through application pools? Check out:

http://code.google.com/p/isapi-wsgi/

and:

http://sourceforge.net/apps/trac/pyisapie

I use the first, but the second has better performance.

2
  • would they also detect a crash and somehow restart?
    – user12096
    Apr 28, 2010 at 11:44
  • Well, I have never had applications crash, that I am aware of. I have had exceptions, but I trap my exceptions at a high level so they don't make it through to IIS. However, I did have application pools designed to shut-down the application to conserve resources if the application hadn't been used in 20 minutes (this is the default behavior). IIS knows that if a request comes in and there is no application in the application pool, that it needs to start the application. I assume this would work the same if the application crashed. Apr 29, 2010 at 15:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .