waha icon indicating copy to clipboard operation
waha copied to clipboard

[Feature Request][NOWEB] API route or any other way to clear messages from storage

Open butteryreapply2 opened this issue 1 year ago • 3 comments

We a planning to run a system with lots of active sessions (100+) for a long period of time and potential problem we found is that we can run out of free space.

Describe the solution you'd like

Two solutions are applicable:

  1. TTL for message in storage. For example TTL=3600 - messages that were received hour ago will be deleted.
  2. API route that clear messages with given filter (created_at_gte e.g.).

Describe alternatives you've considered Completely removing session and login again. But it'll require whole auth flow checks again. Also there is no clear way to understand if particular session using too much space.

patron:PLUS

butteryreapply2 avatar Oct 16 '24 12:10 butteryreapply2

Hi!

  1. Do you use MongoDB or files to store data?
  2. How much storage space are we talking about here? In GB if possible

patron:PRO

devlikepro avatar Oct 17 '24 03:10 devlikepro

  1. files
  2. We make some estimates, in one year time there will be around 30gb by our estimates (around 400 sessions).

patron:PLUS

butteryreapply2 avatar Oct 18 '24 13:10 butteryreapply2

will be around 30gb by our estimates (around 400 sessions)

That's pretty fine for the number.

Because after few months likely many sessions will get re-paired (due to WhatsApp changes), so it means the sessions won't fully be synced and 30gb nowadays is nothing (compared to dev time and effort) Unlikely we'll add something like cleanup api soon, but we'll keep eye on it, thank you for the details!

patron:PRO

devlikepro avatar Oct 21 '24 06:10 devlikepro