diff --git a/api/bin/spark.js b/api/bin/spark.js index 8792c9e..555db30 100644 --- a/api/bin/spark.js +++ b/api/bin/spark.js @@ -31,7 +31,7 @@ const client = new pg.Pool({ // this values should correlate with service concurrency hard_limit configured in fly.toml // and must take into account the connection limit of our PG server, see // https://fly.io/docs/postgres/managing/configuration-tuning/ - max: 100, + max: 150, // close connections that haven't been used for one second idleTimeoutMillis: 1000, // automatically close connections older than 60 seconds diff --git a/api/fly.toml b/api/fly.toml index 620d283..93f0a34 100644 --- a/api/fly.toml +++ b/api/fly.toml @@ -27,8 +27,8 @@ processes = [] script_checks = [] [services.concurrency] # Remember to update PG Pool config option `max` in bin/spark.js when changing `hard_limit`. - hard_limit = 1500 - soft_limit = 600 + hard_limit = 2000 + soft_limit = 1000 type = "connections" [[services.ports]]