People keep saying that my site always dangles on some pages. I checked the stierr unicorn log and found many timeout errors, such as:
E, [2013-08-14T09:27:32.236478 #30027] ERROR -- : worker=5 PID:11619 timeout (601s > 600s), killing E, [2013-08-14T09:27:32.252252 #30027] ERROR -- : reaped #<Process::Status: pid=11619,signaled(SIGKILL=9)> worker=5 I, [2013-08-14T09:27:32.266141 #4720] INFO -- : worker=5 ready
There are many error messages.
Then I go to the rail processing log, find the exact queries, looking for the unicorn error time minus 601s. These timeout requests are all clogged during the page rendering phase. Sql of these queries have already been done. It just never ends:
Processing by XXXController
Not. Most of these requests have been successfully submitted. I donβt know why at random times there there.
I do not know what might cause this. Can someone let me know how to find the real reason why unicorn workers expire?
Update:
We used NSC to send the request and response to the unicorn. And to try to improve the timeout, we added nginx between NSC and the unicorn. It turns out that the unicorn working timeout still occurs, and each timeout corresponds to the nginx upstream timeout in the nginx error log.
Does anyone know if there is some kind of bottle neck in the unicorn's TCP connection?
source share