Last active
December 17, 2015 16:59
-
-
Save wijet/5643212 to your computer and use it in GitHub Desktop.
Configuration which makes puma leak file descriptors
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rack' | |
require 'rack/lobster' | |
run Rack::Lobster.new |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defaults | |
log global | |
mode http | |
option httplog | |
option dontlognull | |
timeout client 10s | |
timeout server 10s | |
timeout connect 10s | |
listen lobster localhost:9000 | |
balance roundrobin | |
server localhost:3000 localhost:3000 check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# haproxy version: 1.4.23 2013/04/03 | |
# puma 2.0.1 | |
# os: Linux 3.8-2-amd64 #1 SMP Debian 3.8.13-1 x86_64 GNU/Linux, also tested on OSX 10.8.3 | |
$ haproxy -f haproxy.cfg | |
$ puma --port 3000 config.ru | |
$ ls /proc/PUMA_PID/fd -l | wc -l | |
# after some time, puma stops responding on port 3000 | |
$ curl http://localhost:3000 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment