Forums

My webapp goes down everyday.

Do I have to reload it by coming back to website everyday?

I went through the previous answers , did not find any satisfactory answers.

That certainly shouldn't happen. What are the symptoms? What error (if any) do you see when it goes down?

I get following error usually when I try to reload through the bookmarked link:

{"error_class": "slow_startup_error"}

I have hosted my APIs on pythonanywhere. If I hit any end point after a day I get 500 Internal server error, but when I reload through the button it works.

My understanding (and I don't work for PythonAnywhere) is that the first time a web app is reloaded following a system update, then it needs to "spin up", which can make it slow. Subsequently, it is in memory and should be very quick.

Do you think this could be what you are seeing?

Alternatively, does your API have some kind of data structure that is growing over time, causing it to become slower and slower, and then - eventually - to time out after about a day of use?

What is the error in your error log when you get the 500 after a day?

No my apis are Restish, and stateless, so there is no data structure which grow over a period of time. @glenn, I can't see the error log now since I deleted my web app. but I frequently get slow startup error I mentioned earlier.

Even after deleting your app and creating a new one, you should still be able to access the error log and see the errors for earlier dates.

It should be located at /var/log/your_app.pythonanywhere.com.error.log.1 (mind the "1" at the end).