Permalink
Browse files

puma: 3 workers, each worker has 12 threads

  • Loading branch information...
sorah committed Oct 31, 2015
1 parent c089409 commit 2ddfd24d48cd491efe3bf9cc44389a8d2603aa3b
Showing with 10 additions and 1 deletion.
  1. +10 −1 5f/webapp/ruby/puma_config.rb
@@ -3,5 +3,14 @@
pidfile '/home/isucon/webapp/ruby/puma.pid'
state_path '/tmp/puma.state'
stdout_redirect '/tmp/puma-out.log', '/tmp/puma-err.log', true
-threads 0, 32
bind 'unix:///tmp/puma.sock'
+
+workers 3
+threads 0, 12
+preload_app!
+
+on_worker_boot do
+ if defined?(Redis) && Redis.current.connected?
+ Redis.current.client.reconnect
+ end
+end

0 comments on commit 2ddfd24

Please sign in to comment.