perf: leaderboard SWR cache + threadpool fix for season-III stalls
- Fix 1: UV_THREADPOOL_SIZE=24 via start_server.sh wrapper (libuv reads OS environ; process.env and PM2 env blocks don't propagate on this system) - Fix 2: Stale-while-revalidate for leaderboards — serve cached/stale data instantly, refresh in background; dedicated aggregateCache isolated from the 100-entry responseCache; single-flight dedup for concurrent computes - Fix 3: Background warmer precomputes current + last-completed season leaderboards at +20s boot and every 4 min - Fix 5: Adaptive TTL (5 min live, 24 h completed) via aggregateCacheTtl - Fixes 1+2 combined: player page stall 95s -> 3.6s under concurrent heavy leaderboard load; warm hits served in 1-4ms (was 13-53s)
This commit is contained in:
Executable
+5
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
# Wrapper so libuv reads UV_THREADPOOL_SIZE from the OS environ block.
|
||||
# PM2's env:/env_file don't propagate to child processes on this system.
|
||||
export UV_THREADPOOL_SIZE=24
|
||||
exec node --max-old-space-size=6144 server.js
|
||||
Reference in New Issue
Block a user