[GOWS] - Memory leak
I'm using version 11.4 and it's still having memory leaks. This server had the API running for approximately 24 hours, with only 18 active sessions during that entire period. The server has 6GB of RAM and 2 CPUs.
Note: I'm using S3 and PostgreSQL.
I've noticed that behavior, and to me 12.1 has fixed it.
The peaks are fine, but the constant growth isn't. 🤔 Let's see if the update helps.
@matteus-siqueira, could you attach the htop for this service or your Discord contact?
We'll need more information and some diagnostic tools to determine the issue.
Same pattern here, with some numbers in case they help.
Setup: WAHA CORE 2026.9.2, GOWS, one session, local storage, Docker with a 1 GB limit. After a restart the container sits around 400 MB, then crosses 80% of 1 GB within 4-20 hours on busy days. Our watchdog has been restarting it about once a day since July.
I took two heap snapshots (WAHA_DEBUG_MODE + /api/server/debug/heapsnapshot) on the same day, at 05:35 and 16:00, with the limit raised to 2 GB for the test:
- JS heap: 176 MB -> 174 MB. No object type grew.
- Container peaked at 1.5 GB during the day.
- At 16:00 the Node process (
MainThread) had ~834 MB RSS against ~174 MB of JS heap.gowswas ~95 MB. - cgroup memory was mostly anon, not file cache.
- Media downloads run at roughly 40/hour (including Status posts).
So the growth looks like native/off-heap memory in the Node process, not JS objects and not gows. Media handling (download buffers, the Lottie -> WebP path through @napi-rs/canvas + sharp) would be my first guess, but I haven't confirmed it. I'm trying MALLOC_ARENA_MAX=2 now and will report back. Happy to collect other diagnostics if you tell me what's useful.