Heroku H13 Error

I get this error now and turned off for the last two days since I deployed my application to heroku. This happens before I started using the unicorn as a server, as well as later. Sometimes I can restore it and run using heroku run rake db:migrate then heroku restart , but this only fixes it for a couple of hours and it breaks down again. Regarding the web page, she says "Application Error." Logs are not very useful, but here, what he says every time this error occurs:

 [2014-10-27T21:13:31.675956 #2] ERROR -- : worker=1 PID:8 timeout (16s > 15s), killing [2014-10-27T21:13:31.731646 #14] INFO -- : worker=1 ready [2014-10-27T21:13:31.694690 #2] ERROR -- : reaped #<Process::Status: pid 8 SIGKILL (signal 9)> worker=1 at=error code=H13 desc="Connection closed without response" method=GET 

I just use the free version of heroku, I want to make sure that it works before the update, but is this my only option at this point?

I can also do this locally fine using either rails server or foreman start .

+6
source share
1 answer

Heroku docs will tell H13 about it :

H13 - Connection closed unanswered

This error occurs when a process in your web dynamo accepts a connection, but then closes the socket without writing anything.

One example of when this can happen is when the Unicorn web server is configured with a timeout of less than 30 seconds, and the request was not processed by the worker before the timeout expired. In this case, Unicorn closes the connection before any data is written, resulting in H13.

A couple of lines up, you have an error regarding the process time after 15 seconds:

 ERROR -- : worker=1 PID:8 timeout (16s > 15s), killing 

Heroku Help contains a timeout settings section:

Depending on your language, you can set a timeout at the application server level. One example is Unicorn Rubys. In Unicorn, you can set a timeout in config/unicorn.rb as follows:

timeout 15

The timer will start after Unicorn starts processing the request, if 15 seconds elapse, then the master process will send SIGKILL to the worker, but the exception will not be raised.

Corresponds to error messages in your log. I would have looked.

+5
source

Source: https://habr.com/ru/post/977300/


All Articles