waha icon indicating copy to clipboard operation
waha copied to clipboard

[GOWS] whatsmeow_sessions table is growing rapidly #1406

Open hsxonz opened this issue 1 year ago • 9 comments

šŸ‘‰ Kindly use GitHub Discussions to ask questions! I am currently using postgresql to store sessions. Are there any tables I can periodically delete to avoid wasting space?

patron:PLUS

hsxonz avatar Sep 25 '25 06:09 hsxonz

What engine do you use?

If it's NOWEB/GOWS Check messages, media tables for each session https://waha.devlike.pro/docs/how-to/storages/#faq

If it's WEBJS - nothing to clear, it's just big zip archive

patron:PRO

devlikepro avatar Sep 25 '25 07:09 devlikepro

I use GOWS. But I see the session has used about 12GB. And when I revoke and log back in, the capacity is much lower

patron:PLUS

hsxonz avatar Sep 26 '25 07:09 hsxonz

@hsxonz could you analyze the usage per-session/per-table and send us the result here?

patron:PRO

devlikepro avatar Sep 28 '25 09:09 devlikepro

Image Image Image

Will being logged in multiple times increase the number of records? And how can I delete old data while keeping only the latest session? These sessions have only been active since September 9, so it has only been 18 days, but the storage usage is already very high. I tested revoking and logging in again with another session, and it only took around 2GB. @devlikepro

patron:PLUS

hsxonz avatar Sep 28 '25 09:09 hsxonz

In the past few days, I noticed the data was only around 15–20GB, but after deleting the message table, the storage usage seems to have increased a lot. I’m not sure if deleting the message table has any impact. @devlikepro

patron:PLUS

hsxonz avatar Sep 28 '25 09:09 hsxonz

"Whatsmeow sessions" shouldn't take that long and should be cleared after logging out/scanning the QR code šŸ¤” We'll check it.

patron:PRO

devlikepro avatar Sep 28 '25 10:09 devlikepro

@devlikepro how can i delete old sessions in postgres to solve my situation? And what should i delete?

patron:PLUS

hsxonz avatar Sep 29 '25 10:09 hsxonz

āš™ļø Updates

patron:PRO

devlikepro avatar Oct 04 '25 10:10 devlikepro

@hsxonz could you try new version? Try logout and scan qr code for sessions with big tables

patron:PRO

devlikepro avatar Oct 04 '25 10:10 devlikepro