Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Heroku H18 503 "Request Interrupted" errors

I see quite a few of these. I understand what they mean, which is why I can't understand why it is happening. Is very inconsistent, and does not appear to be a timeout issue.

Relevant stuff:

  • Php/laravel/Postgres Heroku
  • I force SSL
  • I route / to /anotherroute
  • I can't replicate with any client myself
  • The route is not always the same, sometimes a simple load of an asset
  • I have seen no application errors reported
  • sock=client
  • The service time is always < 1 second

Some log data:

Oct 29 18:22:12 myapp-web-production heroku/router: sock=client at=error code=H18 desc="Request Interrupted" method=GET path="/aroute" host=... request_id=... fwd="##.##.##.###" dyno=web.1 connect=2ms service=34ms status=503 bytes=3816

Oct 29 18:22:13 myapp-web-production heroku/router: sock=client at=error code=H18 desc="Request Interrupted" method=GET path="/aroute" host=... request_id=... fwd="##.##.##.###" dyno=web.1 connect=1ms service=538ms status=503 bytes=3822

Oct 29 18:22:14 myapp-web-production heroku/router: sock=client at=error code=H18 desc="Request Interrupted" method=GET path="/aroute" host=... request_id=... fwd="##.##.##.###" dyno=web.1 connect=1ms service=406ms status=503 bytes=13927

I'm stuck. Any help would be appreciated.

like image 953
Nick Avatar asked Oct 30 '14 03:10

Nick


People also ask

Why heroku shows Application Error?

"Application Error" or similar is always caused by your own application code. Routing errors will normally only surface themselves within the logs of your application. In most cases, you will be able to see the cause of the error there.

How can I see heroku errors?

Simply use heroku logs to display the last 100 lines of your logs. Heroku only saves the last 1500 lines of logs, which you can access using heroku logs -n 1500 . If you want more logging, check out Heroku add-ons like Logentries or Papertrail.

How do I view heroku logs?

You can view logs with the Heroku CLI, the dashboard, your logging add-on, or in your log drain. You can't view logs for apps in Shield spaces with Private Space Logging enabled. Retrieve logs from your log drain instead.


1 Answers

I take the sock=client attribute to mean that the client is just disconnecting before the server can respond. We can reproduce this by adding an artificial 10s delay to the handler and then, for example, requesting the endpoint in a web browser and closing it before the server can respond.

We just filter all H18s with sock=client out of our logs.

like image 117
Riley Lark Avatar answered Oct 03 '22 19:10

Riley Lark