There is a bot. Posted on Heroku. Run from Procfile like this:

web: python UselessBot.py 

The problem is that he falls in 60 seconds with this log

 Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch 

and does not restart. How to fix? I understand that he needs a port ... but I do not understand where it comes from

    2 answers 2

    Oops, I found where the joint is. Modified Procfile as follows:

     bot: python UselessBot.py 

      Absolutely not, it will not fix the problem. The fact is that Heroka is not designed to host bots as such. For you, Heroku is looking for a supposedly existing web application and, accordingly, its port, after not finding it, it is falling. It is better to copy the Python application, which Heroku gives for example and screw the bot to him as a worker. Well, either create a django or flask application and not just a Python script.

      • 2 bots work stably with me in such a way. I do not just CAM answer your question - Whiskey Motel
      • In the last sentence I understood myself what I wrote? And yes, if they work like this, then you clearly understand in Heroku that something is not completely ( - skipperprivate