Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why does my application work fine until its idle for a while then the next request returns a “500 Internal Error” response?

0
Posted

Why does my application work fine until its idle for a while then the next request returns a “500 Internal Error” response?

0

Are you on mysql? If so, this is probably the mysql time out. Because cherrypy is a long running process it doesn’t make a new connection on every page load. After a period of inactivity the mysql server will timeout the connection. This causes an error the next time the application attempts to use the connection. One solution some people use is to set up a cron job that every so often wgets a page from the application that will cause a database query. There is also apparently a mysql wait_timeout setting that can be adjusted to stop the connection from timing out.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123