I can confirm that allowing a longer backlog queue (in unicorn config +
net.core.somaxconn and net.core.netdev_max_backlog) did solve the issue (for
me).
I posted a bit more details at http://stackoverflow.com/a/15544229/1061997.
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,237573,23
Thank you.
BTW: having googled it for different expressions I've found that it is a
well known issue and that it has nothing to do with nginx or the Rails app
itself. Unicorn in and of itself can neither be blamed (albeit IMHO there
should be some official documentation on this issue, esp. since n
(under what conditions) does nginx send a 502
response?
Thanks in advance,
fastcatch
PS: The app's worker processes do not seem to be irresponsive, slow, blocked
for IO or anything else I have been able to identify as a possible cause.
Thus I want to understand more the nginx side so as to