Nginx + Unicorn + RoR: "502 Bad Gateway" Resource temporarily unavailable

956 views Asked by At

Am using RoR with Unicorn as a application server and Nginx as a webserver.

Recently we are facing bad gateway issues while hitting the concurrent request of 100/sec. The nginx error says unicorn.soc failing to connect & resource temporarily unavailable.

There was not much load on the server and there is no memory or IO in the server. We did all the tuning as suggested by the forum users. But still results are the same.

App server conf :

  • 16 cores with 56 GB RAM
  • Nginx with 50 workers
  • Unicorn as 50 Works

Open file descriptors and socket max connections are increased to 65535

Same server configuration with postgres 9.5

Let me know if you need more config details

0

There are 0 answers