Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How should I interpret Heroku H18 errors?

Tags:

heroku

We're seeing quite a lot of Error H18 (Request Interrupted) in the logs. How should these be interpreted, since sock=client in all cases I assume that it is the client that is disconnecting. Should it therefore be safe to ignore these?

like image 808
Kristoffer Avatar asked Oct 03 '12 08:10

Kristoffer


People also ask

How do I read 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 fix heroku errors?

There are some errors which only occur when the app is rebooting so you will need to restart the app to see these log messages appear. For most apps, we also recommend enabling one of the free logging addons from https://elements.heroku.com/addons#logging to make sure that your historical log data is being saved.


2 Answers

This typically indicates either that the user's network was disconnected (e.g. this happens with some frequency for mobile users) or the end-user closed their browser or similar (e.g. pressed Stop, went to a different page, etc).

You can safely ignore those that are tagged as being client-end in nature with "sock=client", but might want to investigate those that are being closed by the Server end ("sock=server").

like image 193
catsby Avatar answered Sep 21 '22 12:09

catsby


Edit (Aug 10, 2015): My answer below for H18 errors is out of date. Heroku has changed the behavior of H18 errors making them more specific (and serious) than before. This Answer is now more correct.


H18 Errors

I recently asked Heroku support about a significant number of H18 errors (3-4 an hour sometimes) my app was receiving and being surfaced in the Metrics section of the new Heroku dashboard (screenshot above). I referenced catsby's response on this thread and asked to confirm if they were in fact not actionable. This was the response I received from Heroku Support:

I just went through the last 24 hours of H18s on your app. They are all sock=client and looking at the User-Agent I see a lot of the usual culprits. Mobile browsers for the most part and also the latest Chrome which I have seen other apps have issue with as well since a few days ago. Unless you see a pattern such as for a particular URL or user then it often is just network issues.

[That these H18 errors are] Not actionable is not always true. Some apps do care about it, and sometimes it can also mean a client crash rather than a network error. Browsers do crash from time to time but in particular mobile browsers can be pretty fragile. If an app uses a lot of assets and triggers "page not responding" errors you might see spikes in H18s. In that case sometimes there is something you can do about it. Other apps are serviced entirely in wired networks and would never expect it, in that case there could be a faulty switch or firewall. For the sake of transparency we still want to report these errors as there is no way to tell if they are or aren't actionable.

To summarize, most of the time you can ignore them if they are sock=client errors, but that does indicate that clients are disconnecting which could indicate a real issue depending on how your application is networked to its clients (e.g. mobile or really bad network connection)... but probably you can safely ignore them.

like image 44
Ben Sheldon Avatar answered Sep 23 '22 12:09

Ben Sheldon