diff --git a/fly.toml b/fly.toml index bfd8d08d19..38fc89f208 100644 --- a/fly.toml +++ b/fly.toml @@ -32,8 +32,8 @@ swap_size_mb = 152 [services.concurrency] type = "connections" - hard_limit = 375 - soft_limit = 300 + hard_limit = 775 + soft_limit = 600 [[services.tcp_checks]] # super aggressive interval and timeout because @@ -61,8 +61,8 @@ swap_size_mb = 152 [services.concurrency] type = "connections" - hard_limit = 375 - soft_limit = 300 + hard_limit = 775 + soft_limit = 600 [[services.tcp_checks]] # super aggressive interval and timeout because diff --git a/src/commons/envutil.js b/src/commons/envutil.js index f07b8e9e56..b270992d3a 100644 --- a/src/commons/envutil.js +++ b/src/commons/envutil.js @@ -191,16 +191,16 @@ export function isCleartext() { // sysctl get net.ipv4.tcp_syn_backlog export function tcpBacklog() { - if (!envManager) return 300; + if (!envManager) return 600; // same as fly.service soft_limit - return envManager.get("TCP_BACKLOG") || 300; + return envManager.get("TCP_BACKLOG") || 600; } // don't forget to update the fly.toml too export function maxconns() { - if (!envManager) return 500; + if (!envManager) return 1000; // 25% higher than fly.service hard_limit - return envManager.get("MAXCONNS") || 500; + return envManager.get("MAXCONNS") || 1000; } export function minconns() {