PagerDuty just woke you: "web-cache-1 memory 94% used". The dashboard shows memory pegged near the top and trending up over the last week. The on-call runbook someone wrote says "restart the app to free memory", and a teammate is suggesting you resize the box to 16 GB.
Before you do anything: decide whether this is actually a memory problem. Read the right numbers, and name the correct action — which may be no destructive action at all.
web-cache-1, Debian 12, 8 GiB RAM, 2 GiB swap.postgres DB, a gunicorn web app behind nginx, the usual systemYou've solved it when:
free (try free -h) shows available is most of RAM (~6.4 GiB / 82%)free/used, not
available. The large buff/cache (~6.2 GiB) is reclaimable page cache,
not consumed memory.
top shows %wa ~0 and no process dominating
RES (postgres at ~7.5% MEM is the biggest, and it's the thing that
warmed the cache — it is not "the memory").
available (MemAvailable), not used/free.