Report this

What is the reason for this report?

Every 2-4 weeks I get (111: Connection refused) while connecting to upstream. Why?

Posted on November 7, 2016

I have a rails app that uses Nginx and Puma. Every 2-4 weeks my app starts giving 502 errors. When digging into log files, this is the error that comes up

[error] 8353#8353: *38966 connect() to unix:///home/deploy/apps/later_backend/shared/tmp/sockets/later_backend-puma.sock failed (111: Connection refused) while connecting to upstream, client: 69.162.124.234, server: later.bz, request: "GET / HTTP/1.1", upstream: "http://unix:///home/deploy/apps/later_backend/shared/tmp/sockets/later_backend-puma.sock:/", host: "later.bz", referrer: "http://later.bz"

A restart will fix the issue but I’m getting really sick of my app crashing every 2-4 weeks and having to do a manual restart. Amy thoughts on what this could be?

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Start building today

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.