问题
I am getting a timeout error in a web dyno causing a H13 error on the Heroku router.
This is timeout is caused by a device POSTing data into a Ruby on Rails application.
When the timeout occurs, the Heroku logs show a H13 error and the device logs show a "Service Unavailable" error.
» 21:34:49.622 2014-12-31 21:34:49.320039+00:00 app web.1 - - E, [2014-12-31T21:34:49.305349 #2] ERROR -- : worker=1 PID:10 timeout (31s > 30s), killing
» 21:34:49.659 2014-12-31 21:34:49.361147+00:00 app web.2 - - E, [2014-12-31T21:34:49.358409 #2] ERROR -- : worker=1 PID:10 timeout (31s > 30s), killing
» 21:34:49.746 2014-12-31 21:34:49.437289+00:00 app web.2 - - E, [2014-12-31T21:34:49.437060 #2] ERROR -- : reaped #<Process::Status: pid 10 SIGKILL (signal 9)> worker=1
» 21:34:49.765 2014-12-31 21:34:49.461293+00:00 app web.1 - - E, [2014-12-31T21:34:49.461152 #2] ERROR -- : reaped #<Process::Status: pid 10 SIGKILL (signal 9)> worker=1
» 21:34:50.075 2014-12-31 21:34:49.775187+00:00 app web.2 - - I, [2014-12-31T21:34:49.774434 #16797] INFO -- : worker=1 ready
» 21:34:50.124 2014-12-31 21:34:49.742957+00:00 heroku router - - at=error code=H13 desc="Connection closed without response" method=POST path="/edfsegments" host=reassure.herokuapp.com request_id=5e629594-3b38-41a9-b66e-9e2565123be3 fwd="86.46.75.170" dyno=web.1 connect=1ms service=30853ms status=503 bytes=0
When that specific device tries to POST data again, it immediately gets a H13 error. It appears that the Heroku router has a memory of the device that causes the H13 error.
Other devices can continue to POST data.
I am looking at ways of preventing the timeout (but that is another problem). I have to prepare for the situation where eventually under load a H13 error can occur.
Even when I restart the Rails app, the stickness continues.
Any ideas as to what is causing this?
Many thanks, John A.
来源:https://stackoverflow.com/questions/27801858/how-do-you-clear-a-sticky-heroku-router-h13-error