orders-host (2 GB RAM) is alive but crawling — every request takes seconds and the box feels frozen, yet nothing has crashed. The on-call sees swap almost full and is about to add more swap. Work out what is actually wrong before you do — adding swap here makes it worse.
orders-host, Debian 12, 2 GB RAM, 2 GB swap.orders-api) with a pool of workers.You've solved it when:
vmstat: swap is heavily USED (swpd ~1.9 GiB) but thesi/so TRAFFIC (tens of MB/s swapped in AND out
continuously) with b (blocked) and wa (I/O wait) elevated — the box is
thrashing its working set, not merely parking cold pages.
free / top / ps aux --sort=-rss to see this is anworkers = 6 sized forpreload_app). NOT add more swap, NOT
reboot, NOT kill one worker (the next request just respawns the pressure).