whatsapp-http-api icon indicating copy to clipboard operation
whatsapp-http-api copied to clipboard

how to delete in-active session, as my memory storage is getting full and k8's pod getting evicted.

Open khushboo-scogo opened this issue 1 year ago • 7 comments

hey @allburov , I am using the plus version and running my container on k8's pod. After some hours, the memory gets full and the pod gets evicted. I have already increased the memory for the pod. But it gets full eventually. This makes Apis slow and takes time to get a response. As the pod gets evicted, it exits all sessions. How should I manage this? How can I get in-active or unused sessions and delete them and free up the space. Guide me on this please!

Thanks in advance

khushboo-scogo avatar Sep 05 '23 10:09 khushboo-scogo

How much memory size we're talking about? How much sessions do you run? Is there any graphs may be with memory consumption.

allburov avatar Sep 05 '23 12:09 allburov

If you stop sessions with /stop endpoint it releases memory immediately

allburov avatar Sep 05 '23 12:09 allburov

hey @allburov , so this is the memory consumption of my pod just after some sessions. image This is the total size of .session/webjs folder. image whats the solution for this?? sessions folder itself is taking all the memory. Eventually pod gets slow and evicts after some duration. Please guide me on this??

khushboo-scogo avatar Sep 07 '23 06:09 khushboo-scogo

Getting one more issue in core version, after qr event, authenticate event is not getting triggered. image I have scanned the qr but getting its status is in scan qr state image

whats the issue???

khushboo-scogo avatar Sep 07 '23 07:09 khushboo-scogo

I have scanned the qr but getting its status is in scan qr state

The issue about SCAN_QR_CODE, working on that https://github.com/devlikeapro/whatsapp-http-api/issues/199

whats the solution for this??

Could you explain a bit more your case - how does the session folder affect RAM? It must not if you run it right and map .sessions to host's folder

this is the memory consumption of my pod just after some sessions.

How much exactly sessions do you run?

sessions folder itself is taking all the memory.

If I get the screenshot right, it's 670000 bytes ~ 0.67mb, shouldn't be a problem even if you put it in RAM.

allburov avatar Sep 07 '23 08:09 allburov

Remember that WEBJ engine runs chromium instance under the hood for each session. it uses puppeter to work with that (which also have memory leak) May it's the issue here.

If you want to run more then few sessions - we'd recommend using NOWEB engine - it works via websockets and doesn't run chromium under the hood.

allburov avatar Sep 07 '23 08:09 allburov

whats the issue???

⚠️ New version 2023.9.7 is out (both core and plus). If you're experiencing any issues with SCAN_QR state or sending messages doesn't work - please update it, restart containers and try try again!

allburov avatar Sep 07 '23 10:09 allburov

Hi! Let us know if you're expereicing issue with latest version, it's been improved a lot sine 2023.9

patron:PRO

devlikepro avatar Jun 24 '24 12:06 devlikepro