devlikeapro / waha

WAHA - WhatsApp HTTP API (REST API) that you can configure in a click!
https://waha.devlike.pro/
Apache License 2.0
813 stars 248 forks source link

[BUG][NOWEB] - restart connection every N minutes #336

Closed AliBakerSartawi closed 1 month ago

AliBakerSartawi commented 1 month ago

Describe the bug

Long-running NOWEB sockets error out sometimes. An internal restart every few minutes could be helpful.

Version

{
  "version": "latest",
  "engine": "NOWEB",
  "tier": "PLUS",
  "browser": "/usr/bin/google-chrome-stable"
}

To Reproduce Steps to reproduce the behavior:

  1. Start a few NOWEB sessions
  2. Sometimes the sockets would error out after some time (2 hours), sometimes they do not. When they error out, sometimes the whole WAHA server crashes, and sometimes the session is restarted after 2 seconds.
  3. I'm using an external file system to persist auth files... which may have some latency... so when the sessions restart, sometimes the auth files are corrupt and session loses its auth.

Expected behavior

Long-running NOWEB sockets should stay healthy.

Engine I'm using NOWEB engine.

Requests - Responses

Please attach all sent requests, responses that you sent.

Docker Logs

CleanShot 2024-05-19 at 07 02 14@2x

Screenshots

Additional context

CleanShot 2024-05-19 at 06 55 13@2x

patron:PRO

allburov commented 1 month ago

Added every 30 minutes in 2024.5.14 NOWEB engine. No configuration parameter for that yet, it's better to find the right for all cases parameters if it's possible. Let me know if it doesn't help in your case!

patron:PRO

AliBakerSartawi commented 1 month ago

@allburov Thanks 🙏🙏🙏

Our servers seem to be using less RAM, not sure if it's because of this fix or something else you changed in the past few days... fantastic 🚀

patron:PRO