Skip to content

Errno::ENOTCONN - Socket is not connected #583

@rwojsznis

Description

@rwojsznis

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 <[email protected]>, Michal Papis <[email protected]> [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? 😢

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions