1

I have a Heroku free web app which was working nicely with my initial testing, but with a bigger test it just crashed:

2020-06-17T21:45:10.068131+00:00 app[web.1]: my last console.log message
2020-06-17T21:46:39.334604+00:00 heroku[web.1]: Idling
2020-06-17T21:46:39.336851+00:00 heroku[web.1]: State changed from up to down
2020-06-17T21:46:40.202867+00:00 heroku[web.1]: Stopping all processes with SIGTERM
2020-06-17T21:46:40.240320+00:00 heroku[router]: at=info method=GET path="/sockjs/432/q7l5m7n6/websocket" host=not-my-real-app.herokuapp.com request_id=ec5f9418-fe2b-4b50-8f92-fb59e315f2ce fwd="CLIENT-IP" dyno=web.1 connect=0ms service=2415813ms status=101 bytes=175 protocol=https
2020-06-17T21:46:40.240323+00:00 heroku[router]: at=info method=GET path="/sockjs/106/0_a5cq0q/websocket" host=not-my-real-app.herokuapp.com request_id=5ca1d1cb-03d4-4107-887b-a206449692c7 fwd="CLIENT-IP" dyno=web.1 connect=0ms service=2321844ms status=101 bytes=175 protocol=https
    +12 other similar messages, one per browser window connected
2020-06-17T21:46:40.288644+00:00 heroku[web.1]: Process exited with status 143
2020-06-17T21:46:40.451795+00:00 heroku[web.1]: Unidling
2020-06-17T21:46:40.459070+00:00 heroku[web.1]: Unidling
2020-06-17T21:46:40.464243+00:00 heroku[web.1]: State changed from down to starting
2020-06-17T21:46:40.469937+00:00 heroku[web.1]: Unidling

The logs seem to indicate that the dyno was stopped by Heroku. This was some time into my first test with many (14) simultaneous web clients connections, so it wasn't idle (certainly not for 30 minutes), and I have plenty (989.08) of free dyno hours remaining.

Do you know why my app might have been killed? I could upgrade to a hobby account, but I don't know if that would help.

Or could it be a crash of my application code, despite what the logs seem to show?

Details:

  • Free web dyno
  • mLab MongoDB add-on
  • Region: Europe
  • Stack: heroku-18
  • Framework: Node.js
  • Slug size: 47.2 MiB of 500 MiB
Tim Adye
  • 101
  • 1
  • 3
  • This seems to happen each time about 30 minutes after starting the dyno. That sounds like the timeout, but I thought the timeout was only for idle processes. – Tim Adye Jun 18 '20 at 10:06

1 Answers1

1

After testing this out many times, I found that Heroku killed my Dyno after 34:41 to 38:25 (mins:secs) from when it was started ("Unidling" to "Idling" messages). According to the documentation, it should only do this for idle Dynos. Each time I was using it throughout the ~35 minutes, ie. open connections, server activity (evidenced by console.log messages in the server log), and client-server traffic.

I switched to a "Hobby" type Dyno, and after that they ran uninterrupted. I just used it for 2 hours without trouble, and have tested it left idle overnight.

I can understand Heroku having a restriction on free apps, but these should be accurately documented. It does not speak well for their reliability as a hosting service that they kill Dynos without explanation or notification (as far as I can see). For me this is an ugly stain on their otherwise excellent service.

Tim Adye
  • 101
  • 1
  • 3