Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request][NOWEB] - Hide "auto-restart" from API (STARTING => WORKING status changes) #756

Open
App-developer-269 opened this issue Jan 24, 2025 · 7 comments
Labels

Comments

@App-developer-269
Copy link

App-developer-269 commented Jan 24, 2025

Describe the bug

When the dashboard tab is active everything fine, but when i close the dashboard tab the session are Auto-restarting.

{
  "version": "2025.1.06",
  "engine": "NOWEB",
  "tier": "PLUS"
}

Docker Logs

i have attached logs for both situation when the dashboard is active and when it is not active.

Additional context

env variables
WAHA_GOWS_PATH=/app/gows
WAHA_GOWS_SOCKET=/tmp/gows.sock
WAHA_LOCAL_STORE_BASE_DIR=/sessions
WAHA_LOG_FORMAT=PRETTY
WAHA_LOG_LEVEL=info
WAHA_MEDIA_STORAGE=LOCAL
WAHA_ZIPPER=ZIPUNZIP
WHATSAPP_API_SCHEMA=http
WHATSAPP_DEFAULT_ENGINE=NOWEB
WHATSAPP_DOWNLOAD_MEDIA=false

1.dashboard is active
Image
2.dashboard is closed
Image

patron:PLUS

@App-developer-269 App-developer-269 added the bug Something isn't working label Jan 24, 2025
@App-developer-269 App-developer-269 changed the title [BUG][NOWEB] - My sessions are restating when i close the waha server dashboard's tab. [BUG][NOWEB] - My sessions are auto restating when i close the waha server dashboard's tab. Jan 24, 2025
@devlikepro
Copy link
Contributor

devlikepro commented Jan 24, 2025

Hi! websocket reconnects every now and then, by default every 30 minutes, so session can move from WORKING to STARTING and back - that' normal behaviour

When you perform API request to the session that currently restarting - it wait in most cases for 5 seconds, so you shouldn't notice it (but shit happens, yeah)

patron:PRO

@devlikepro
Copy link
Contributor

devlikepro commented Jan 24, 2025

btw, GOWS engine doesn't have this auto restart. But it can reconnects (WORKING=>STARTING=>WORKING) due to keep alive settings or 503 from server

patron:PRO

@App-developer-269
Copy link
Author

App-developer-269 commented Jan 24, 2025

Hi! websocket reconnects every now and then, by default every 30 minutes, so session can move from WORKING to STARTING and back - that' normal behaviour

When you perform API request to the session that currently restarting - it wait in most cases for 5 seconds, so you shouldn't notice it (but shit happens, yeah)

patron:PRO

@devlikepro Thank you for quick response

Every session on my server has good traffic, like everyday for 5 hr's a every session send's 3 to 8 message's every minute.
This is because i am worried about session auto restarting.

What do think should i worry about this or is there any way to stop this behavior.

patron:PLUS

@devlikepro
Copy link
Contributor

devlikepro commented Jan 26, 2025

You can add a retry on your end if you get the response about a session in STARTING status

You'll get 422 Unprocessable Entity HTTP response with response:

{
    "error": "Session status is not as expected. Try again later or restart the session",
    "session": "sessionName",
    "status": "STARTING",
    "expected": ["WORKING"]
}

in this case it's safe to try again (or any other errors, usually)

patron:PRO

@App-developer-269
Copy link
Author

App-developer-269 commented Jan 26, 2025

Is it possible to change the auto restarting behavior of session or increase the timer of auto restart,
without any weird errors/warnings.

patron:PLUS

@devlikepro
Copy link
Contributor

devlikepro commented Jan 28, 2025

Is it possible to change the auto restarting behavior of session or increase the timer of auto restart,

No, it's good practice from real expreience with NOWEB engine we've had. Otherwise it stops working properly.

We probably could log it as "warning" not error and hide from the API that sessions is restarting right now (just add timeout to HTTP API call that would wait until the session gets back to WORKING)
We'll check this!

patron:PRO

@devlikepro devlikepro changed the title [BUG][NOWEB] - My sessions are auto restating when i close the waha server dashboard's tab. [BUG][NOWEB] - Hide "auto-restart" from API (STARTING => WORKING status changes) Jan 28, 2025
@devlikepro devlikepro removed the bug Something isn't working label Jan 28, 2025
@devlikepro devlikepro changed the title [BUG][NOWEB] - Hide "auto-restart" from API (STARTING => WORKING status changes) [Feature Request][NOWEB] - Hide "auto-restart" from API (STARTING => WORKING status changes) Jan 28, 2025
@devlikepro devlikepro added enhancement New feature or request engine:NOWEB labels Jan 28, 2025
@devlikepro devlikepro reopened this Jan 28, 2025
@IchthysMaranatha
Copy link

Yes, something to reduce webhook traffic would be nice for session.status. If we could further filter session.status (eg session.status.failed) so as to pick what is needed for webhook, that would also be nice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants