mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-20 20:55:54 -05:00
Raise nginx connection limits and microcache /calls polling
A traffic surge exhausted nginx's 3 x 4096 worker_connections (each proxied websocket uses two), so Cloudflare got empty responses (520) and the backend's listen queue filled. - worker_processes auto (8 cores), worker_connections 16384, worker_rlimit_nofile 65535. - Cache public /calls endpoints on api.*: 5s for live lists, 60s for historical ones, with cache lock and stale-while-updating so bursts collapse to one backend query. Origin is in the cache key because the backend's CORS header varies by Origin. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
user www-data;
|
||||
worker_processes 3; ## default is 1
|
||||
worker_processes auto;
|
||||
worker_rlimit_nofile 65535;
|
||||
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
events {
|
||||
worker_connections 4096; ## Default: 1024
|
||||
worker_connections 16384;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user