Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errno::ENOTCONN - Socket is not connected #583

Closed
rwojsznis opened this issue Sep 19, 2014 · 1 comment
Closed

Errno::ENOTCONN - Socket is not connected #583

rwojsznis opened this issue Sep 19, 2014 · 1 comment

Comments

@rwojsznis
Copy link

Hi, today I tried runnig puma on production server (MRI, but still wanted to check out the memory footprint), but I'm getting Errno::ENOTCONN after running puma for some time (in the end site is not responding at all)

2014-09-19 18:11:12: Read error: #<Errno::ENOTCONN: Socket is not connected - getpeername(2)>
/<path>/shared/bundle/ruby/2.1.0/gems/puma-2.9.1/lib/puma/server.rb:444:in `peeraddr'
/<path>/shared/bundle/ruby/2.1.0/gems/puma-2.9.1/lib/puma/server.rb:444:in `normalize_env'
/<path>/shared/bundle/ruby/2.1.0/gems/puma-2.9.1/lib/puma/server.rb:469:in `handle_request'
/<path>/shared/bundle/ruby/2.1.0/gems/puma-2.9.1/lib/puma/server.rb:361:in `process_client'
/<path>/shared/bundle/ruby/2.1.0/gems/puma-2.9.1/lib/puma/server.rb:254:in `block in run'
/<path>/shared/bundle/ruby/2.1.0/gems/puma-2.9.1/lib/puma/thread_pool.rb:92:in `call'
/<path>/shared/bundle/ruby/2.1.0/gems/puma-2.9.1/lib/puma/thread_pool.rb:92:in `block in spawn_thread'

Running on shared host (can't really check nginx logs):

ruby 2.1.2p95 (2014-05-08 revision 45877) [x86_64-freebsd9.2]
FreeBSD 9.2-STABLE FreeBSD 9.2-STABLE #3
rvm 1.25.30 (stable) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
Rails 4.1.6

Puma config (+ running on UNIX socket):

threads 1, 8
workers 2
preload_app!
worker_timeout 60

After running it for whole day and bunch of restarts I finally had to revert back to unicorn (running fine on same server for over a year). Any ideas what might be causing this? 😢

@evanphx
Copy link
Member

evanphx commented Jan 20, 2015

Ah. FreeBSD must return that error for unix sockets instead of returning nothing like linux does. Easy fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants