Chapter 18.2.5. Making Sure That CherryPy Stays Up

When you run CherryPy behind your web server, you’re responsible for making sure that your CherryPy server starts up when the machine boots and restarts if it ever crashes. This can be achieved using various techniques:

  • Using a cronjob. (This is a crude way of doing it.) Set up a cronjob that checks every few minutes whether the process is still running. If it isn’t, simply restart it. (If you’re on Windows, you can set up a Scheduled Task to do the same thing.)

  • Using a tool such as Supervisor (or FireDaemon on Windows). These tools can monitor other processes and restart them if the process ever goes down.

  • Using Apache to start CherryPy. The trick is to use Apache’s error-handling mechanism ...

Get Rapid Web Applications with TurboGears: Using Python to Create Ajax-Powered Sites now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.