FIX: Set PG `connect_timeout` to 5 seconds.
* 30 seconds is alittle too long.
This commit is contained in:
parent
2db66072d7
commit
b54eb8f53c
|
@ -92,7 +92,7 @@ class GlobalSetting
|
|||
|
||||
def self.database_config
|
||||
hash = { "adapter" => "postgresql" }
|
||||
%w{pool timeout socket host port username password replica_host replica_port}.each do |s|
|
||||
%w{pool connect_timeout timeout socket host port username password replica_host replica_port}.each do |s|
|
||||
if val = self.send("db_#{s}")
|
||||
hash[s] = val
|
||||
end
|
||||
|
|
|
@ -17,9 +17,12 @@
|
|||
# connection pool size, sidekiq is set to 5, allowing an extra 3 for bg threads
|
||||
db_pool = 8
|
||||
|
||||
# database timeout in milliseconds
|
||||
# ActiveRecord connection pool timeout in milliseconds
|
||||
db_timeout = 5000
|
||||
|
||||
# Database connection timoue in seconds
|
||||
db_connect_timeout = 5
|
||||
|
||||
# socket file used to access db
|
||||
db_socket =
|
||||
|
||||
|
|
Loading…
Reference in New Issue