1

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

The Whiz of Oz
  • 6,763
  • 9
  • 48
  • 85
  • This is the problem with the unicorn your worker is not listening please check your unicorn log what problem facing ??? – Tushar Pal Dec 23 '16 at 15:51
  • you need to provide log outputs – The Whiz of Oz Dec 24 '16 at 10:33
  • Hey Denis, sorry for the late reply. We are not getting any errors in unicorn. But we are getting error in nginx " 2016/12/26 06:24:21 [error] 42447#42447: *238552 connect() to unix:/home/deploy/example/shared/tmp/sockets/unicorn.example.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: x.x.x.x, server: myapp.example.com, request: "GET /tickets/get_ticket_tooltip/461079?_=1482729303381 HTTP/2.0", upstream: "http://unix:/home/deploy/example/shared/tmp/sockets/unicorn.example.sock:/tickets/get_ – user3752088 Dec 26 '16 at 09:16

0 Answers0