Forums

New to PythonAnywhere - does this service shut down the web app after 30 minutes of inactivity?

I am asking because Heroku does, and I am just curious if this does the same? 30 minutes of inactivity makes the web app sleep.

No, we don't do that -- but your site can go to sleep if it's unused for a while. It depends on our load-balancing system -- from time to time we move sites from machine to machine. If your site is one of the ones that is moved then it will be shut down.

However, it will be automatically woken up on the next incoming request, so as long as you make sure that your code doesn't do anything that takes a really long time in its startup code, then it should be completely invisible to people visiting the site.

how should I proceed if my webApp is an REST API server?

There is no difference.

what about TG bot couple times i deployed. after some time it stop. any solutions?

We do not keep consoles running forever. If you need something to run continuously, use an always on task