waha icon indicating copy to clipboard operation
waha copied to clipboard

[GOWS] - Memory leak with a lot of /messages requests

Open matteus-siqueira opened this issue 8 months ago • 6 comments

I migrated a provider with 150 clients from NOWEB to GOWS and unfortunately I had the experience of GOWS breaking down with many requests because it was a chatbot serving 24/7. I had to return to NOWEB, the server consumption using GOWS was absurdly higher than with NOWEB.

patron:PLUS

matteus-siqueira avatar Apr 17 '25 12:04 matteus-siqueira

for the history - we found that it's likely because of frequent GET chat/messages?limit=1 requests. The memory leak happens likely there's a memory leak in grpc server on golang side. Need to check it and see what we can do with such load.

Because yeah, it's not because of the number of sessions, here's another installation:

Image

patron:PRO

devlikepro avatar Apr 18 '25 04:04 devlikepro

Yes, unfortunately the API did not support a high load as noweb does.

patron:PLUS

matteus-siqueira avatar Apr 18 '25 13:04 matteus-siqueira

for the history - we found that it's likely because of frequent GET chat/messages?limit=1 requests. The memory leak happens likely there's a memory leak in grpc server on golang side. Need to check it and see what we can do with such load.

Because yeah, it's not because of the number of sessions, here's another installation:

Image

patron:PRO

What's the secret to making this work?

Could you share the confs and the structure you set up for this?

patron:PLUS

mequelussi avatar Apr 19 '25 16:04 mequelussi

@mequelussi just regular GOWS, no specific options required

https://waha.devlike.pro/docs/how-to/install/

patron:PRO

devlikepro avatar Apr 20 '25 05:04 devlikepro

Are you using postgres or local storage?

patron:PLUS

mequelussi avatar Apr 20 '25 23:04 mequelussi

@mequelussi the instance uses local storage (sqlite3 db basically)

patron:PRO

devlikepro avatar Apr 21 '25 06:04 devlikepro

Hi! Found why it happened, starting from 2025.6.1 there shouldn't exist that memory leak (but may exist another 😆 ) 🤞

patron:PRO

devlikepro avatar Jun 09 '25 07:06 devlikepro