Skip to content

Commit d449e8e

Browse files
committed
Reduce sidekiq concurrency to 7
1 parent 476a51a commit d449e8e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Procfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
web: bundle exec hanami server -p $PORT --no-code-reloading
2-
worker: bundle exec sidekiq -r ./config/boot.rb
2+
worker: bundle exec sidekiq -r ./config/boot.rb -c 7

config/initializers/redis.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
if Hanami.env?(:production)
22
uri = URI.parse(ENV.fetch("REDISTOGO_URL"))
3-
REDIS = ConnectionPool.new(size: 25, timeout: 3) { Redis.new(driver: :hiredis, host: uri.host, port: uri.port, password: uri.password) }
3+
REDIS = ConnectionPool.new(size: 10, timeout: 3) { Redis.new(driver: :hiredis, host: uri.host, port: uri.port, password: uri.password) }
44
elsif Hanami.env?(:test)
5-
REDIS = ConnectionPool.new(size: 25, timeout: 3) { MockRedis.new }
5+
REDIS = ConnectionPool.new(size: 10, timeout: 3) { MockRedis.new }
66
else
7-
REDIS = ConnectionPool.new(size: 25, timeout: 3) { Redis.new(host: 'localhost', port: 6379) }
7+
REDIS = ConnectionPool.new(size: 10, timeout: 3) { Redis.new(host: 'localhost', port: 6379) }
88
end

0 commit comments

Comments
 (0)