Some requests to my site are failed with "Server unexpectedly dropped the connection" and there is no errors in error logs.
RPM is 1-1.2k.
Do you have any ideas?
Here is configs of haproxy, nginx and unicorn:
Before you share logs which is critical you have misconfiguration:
Nginx worker_connections 3000 Reason: keep it 2-3x more than actual active connections number
Nginx worker_rlimit_nofile 20000. Reason: each single connection requires 2 file descriptors for serving request via proxying
Nginx absence of location that serves static files straight from file system bypass backend. Reason: if you pass any static file via backend it reach the limit very quick
Unicorn worker_processes 4. Reason: 4 workers are not enough to serve 1K RPM
System: I guess there is lack of kernel optimisation. Take a look Unicorn System Kernel tips