资源暂时不可用Rails + Unicorn + Nginx

时间:2016-08-01 23:01:25

标签: ruby-on-rails nginx scaling unicorn

我遇到了一些问题,需要扩展我在Unicorn + Nginx上运行的rails应用程序。我们的流量在过去24小时内爆炸了,现在我的nginx错误日志中出现了很多错误:

2016/08/01 18:54:51 [error] 13508#0: *50889 connect() to unix:/home/deploy/website/shared/sockets/unicorn.sock failed (11: Resource temporarily unavailable) while connecting to upstream, client: 162.158.90.189, server: localhost, request: "GET /api/v1/links.json?referrer=home HTTP/1.1", upstream: "http://unix:/home/deploy/website/shared/sockets/unicorn.sock:/api/v1/links.json?referrer=home", host: "website.com", referrer: "http://website.com/"

我已经尝试将积压工作提高到1024但这根本没有帮助。有谁知道发生了什么事?

谢谢!

1 个答案:

答案 0 :(得分:0)

上游配置的nginx默认fail_timeout为10秒。我想你达到了这个幅度。