File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
- workers Integer ( ENV [ 'WEB_CONCURRENCY' ] || 2 )
2
- threads_count = Integer ( ENV [ 'RAILS_MAX_THREADS' ] || 10 )
1
+ workers Integer ( ENV [ 'WEB_CONCURRENCY' ] || 4 )
2
+ threads_count = Integer ( ENV [ 'RAILS_MAX_THREADS' ] || 5 )
3
3
threads threads_count , threads_count
4
4
5
5
preload_app!
6
6
7
7
rackup DefaultRackup
8
8
port ENV [ 'PORT' ] || 3000
9
- environment ENV [ 'RACK_ENV' ] || 'development '
9
+ environment ENV [ 'RACK_ENV' ] || 'production '
10
10
11
11
on_worker_boot do
12
- # Worker specific setup for Rails 4.1+
13
- # See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
14
12
ActiveRecord ::Base . establish_connection
15
13
end
14
+
15
+ before_fork do
16
+ ActiveRecord ::Base . connection_pool . disconnect!
17
+ end
You can’t perform that action at this time.
0 commit comments