-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
Describe the bug
While testing an account connected to chatwoot, I decided to disconnect it because it was in 2 groups that had many messages coming per minute. Instead of first stopping the session or disconnecting from WAHA, I disconnected first from the whatsapp app. WAHA did not detect the sessions as disconnected, they remained 'connected' status in dashboard. Apparently this caused the pending tasks in the queue to apparently loop eternally. Even stopping the chatwoot app in waha, disconnecting or deleting the session, deleting the group contacts, did not stop it, and it practically DDoS my chatwoot app. It would be safer if deleting the session or disconnecting the session cleared any pending tasks in the WAHA queue, or at least stop them from executing until the session is active again. This could probably happen again if some user disconnects their session directly in the whatsapp app.
I deleted the redis volume and restarted, and it stopped the looping tasks.
Version
Get the WAHA version by calling GET /api/version
{
GOWS (2025.9.6 PLUS)
}Steps
To Reproduce Steps to reproduce the behavior:
- Be in big groups (obviously connected to chatwoot) or schedule a bot to send you many messages and media at once
- Disconnect waha session from whatsapp app while receiving the msgs
- Message receiving and media downloading tasks will loop forever (seems like) in millisecond intervals
Expected behavior
Expected pending tasks to be paused until the session is in active state again, or cleared to prevent trying to execute tasks while session inactive. This could hopefully be a 'simple' fix
Docker Logs
I'll send full logs in email since there's a lot of info
edit: I lost the logs from the previous container incarnation due to docker compose removing container and can't recover. But they were just your regular message and media receiving errors, for group chats, in a loop.
Lmk if you can't repro this issue I can try to do it again later and maybe provide better instructions