3

I want to run a firefox-selenium instance on a free tier heroku one-off dynos. When I run it heroku run:detached python script.py, it works for a few minutes, after 1-2 minutes of inactivity, it just stops working. As per the official documentation (https://devcenter.heroku.com/articles/one-off-dynos), it should run 24 hours without stopping.

Detached dynos have no connection, so they have no timeout. However, like all dynos, one-off dynos are cycled every 24 hours. As a result, a one-off dyno will run for a maximum of 24 hours.

Here's the heroku logs:

2020-04-27T19:55:50.842027+00:00 app[run.6600]: Alive
2020-04-27T19:55:50.842045+00:00 app[run.6600]: Alive
2020-04-27T19:56:36.129042+00:00 app[run.6600]: Alive
2020-04-27T19:56:36.129674+00:00 app[run.6600]: Alive
2020-04-27T19:57:40.187286+00:00 heroku[run.6600]: State changed from up to complete

In the python script.py, there is a while loop running constantly checking for updates. When I run it in my local machine, it runs without stopping during inactivity.

m0h17
  • 357
  • 3
  • 9

0 Answers0