diff --git a/sgx_jmp.rb b/sgx_jmp.rb index 5039619f0c401d7ea903005a2b51b8fb59e52c03..bdbc26be7e8e866e392ed80e28608734a627d651 100644 --- a/sgx_jmp.rb +++ b/sgx_jmp.rb @@ -144,6 +144,7 @@ def panic(e, hub=nil) end EM.error_handler(&method(:panic)) +EM.threadpool_size = 10 require_relative "lib/blather_client" @client = BlatherClient.new @@ -220,7 +221,7 @@ when_ready do REDIS = EM::Hiredis.connect MEMCACHE = EM::P::Memcache.connect BTC_SELL_PRICES = BTCSellPrices.new(REDIS, CONFIG[:oxr_app_id]) - DB = Postgres.connect(dbname: "jmp", size: 25) + DB = Postgres.connect(dbname: "jmp", size: EM.threadpool_size + 2) TEL_SELECTIONS = TelSelections.new DB.hold do |conn|