-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
I played a bit with Puma and Systemd socket activation. After not starting puma through bundle exec (Bundler is likely to blame here for messing up the FDs), I got:
Dec 06 14:05:12 aeshna.de puma[19108]: Puma starting in single mode...
Dec 06 14:05:12 aeshna.de puma[19108]: * Version 2.7.1, codename: Earl of Sandwich Partition
Dec 06 14:05:12 aeshna.de puma[19108]: * Min threads: 0, max threads: 16
Dec 06 14:05:12 aeshna.de puma[19108]: * Environment: development
Dec 06 14:05:12 aeshna.de puma[19108]: * Inherited unix:///run/podversion.sock
Dec 06 14:05:12 aeshna.de puma[19108]: Use Ctrl-C to stop
Dec 06 14:05:12 aeshna.de puma[19108]: 2013-12-06 14:05:12 +0100: Read error: #<Errno::EOPNOTSUPP: Operation not supported>
Dec 06 14:05:12 aeshna.de puma[19108]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/server.rb:110:in `setsockopt'
Dec 06 14:05:12 aeshna.de puma[19108]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/server.rb:110:in `uncork_socket'
Dec 06 14:05:12 aeshna.de puma[19108]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/server.rb:633:in `ensure in handle_request'
Dec 06 14:05:12 aeshna.de puma[19108]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/server.rb:638:in `handle_request'
Dec 06 14:05:12 aeshna.de puma[19108]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/server.rb:357:in `process_client'
Dec 06 14:05:12 aeshna.de puma[19108]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/server.rb:250:in `block in run'
Dec 06 14:05:12 aeshna.de puma[19108]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/thread_pool.rb:92:in `call'
Dec 06 14:05:12 aeshna.de puma[19108]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/thread_pool.rb:92:in `block in spawn_thread'
Since IOError is already ignored, I figured I can just add Errno::EOPNOTSUPP to that list. Which brought up
Dec 06 14:09:20 aeshna.de puma[19316]: Puma starting in single mode...
Dec 06 14:09:20 aeshna.de puma[19316]: * Version 2.7.1, codename: Earl of Sandwich Partition
Dec 06 14:09:20 aeshna.de puma[19316]: * Min threads: 0, max threads: 16
Dec 06 14:09:20 aeshna.de puma[19316]: * Environment: development
Dec 06 14:09:20 aeshna.de puma[19316]: * Inherited unix:///run/podversion.sock
Dec 06 14:09:20 aeshna.de puma[19316]: Use Ctrl-C to stop
Dec 06 14:09:20 aeshna.de puma[19316]: localhost - - [06/Dec/2013 14:09:20] "GET /?domain=pod.geraspora.de HTTP/1.0" 200 1054 0.0461
Dec 06 14:09:20 aeshna.de puma[19316]: 2013-12-06 14:09:20 +0100: Read error: #<Errno::EOPNOTSUPP: Operation not supported>
Dec 06 14:09:20 aeshna.de puma[19316]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/server.rb:105:in `setsockopt'
Dec 06 14:09:20 aeshna.de puma[19316]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/server.rb:105:in `cork_socket'
Dec 06 14:09:20 aeshna.de puma[19316]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/server.rb:512:in `handle_request'
Dec 06 14:09:20 aeshna.de puma[19316]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/server.rb:357:in `process_client'
Dec 06 14:09:20 aeshna.de puma[19316]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/server.rb:250:in `block in run'
Dec 06 14:09:20 aeshna.de puma[19316]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/thread_pool.rb:92:in `call'
Dec 06 14:09:20 aeshna.de puma[19316]: /home/mrzyx/.gem/ruby/2.0.0/gems/puma-2.7.1/lib/puma/thread_pool.rb:92:in `block in spawn_thread'
Notice that a request is logged this time. Because of the previous success I just ignored that exception in cork_socket too. It's running now but I'm not sure if just ignoring those errors is the right thing to do, hence the report.
Update: For the Googlers: You can tell bundler to not mangle the FDs with bundle exec --keep-file-descriptors.
Metadata
Metadata
Assignees
Labels
No labels