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

Receiving "Connection to server lost" and "restored" all the time #544

Open
mohammadrafigh opened this issue Apr 10, 2023 · 5 comments
Open
Labels
S-needs-triage Status: Needs triage T-bug Something isn't working the way it is supposed to

Comments

@mohammadrafigh
Copy link

Describe the bug
I receive "Connection to server lost" and immediately "Restored" exactly like #360 . I receive these messages directly and when I'm behind an Nginx reverse proxy. Is there any way to turn off these messages? or at least some config I can fine tune? Currently these toast messages cover screen while watching a video which makes Dim unusable.

To Reproduce
Steps to reproduce the behavior:

  1. Run Dim using Docker behind Nginx and directly

Expected behavior

  1. A way to increase Websocket timeout
  2. A way to turn off WS connection lost toasts
  3. A configuration example for Nginx reverse proxy
@mohammadrafigh mohammadrafigh added S-needs-triage Status: Needs triage T-bug Something isn't working the way it is supposed to labels Apr 10, 2023
@vgarleanu
Copy link
Member

The websocket connection is important in the webui. It can't be disabled.

We do not have any developers with nginx experience around, but I'd assume nginx prematurely closes the websocket connection which causes the webui to reconnect.

@mohammadrafigh
Copy link
Author

The websocket connection is important in the webui.

Yes I just wanted to know if we can disable toast messages not the whole WS.

We do not have any developers with nginx experience around, but I'd assume nginx prematurely closes the websocket connection which causes the webui to reconnect.

The problem also happens when I connect directly. If it helps I use Cloudflare too.

@gbeliako
Copy link

gbeliako commented Apr 17, 2023

in the nginx location i have:

location / {
proxy path stuff
...
...
# WebSocket support
proxy_http_version 1.1;
proxy_buffering off;
proxy_connect_timeout 43200000;
proxy_read_timeout 30d;
proxy_send_timeout 30d;
... i think the 30d timeout solves it
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}

@mohammadrafigh
Copy link
Author

Nope I already have the same config with 7d, I assume 7d and 30d doesn't make any difference since the point is to increasing the timeout to something bigger than a few seconds or minutes.

@mohammadrafigh
Copy link
Author

I think just removing toast messages for connection loss and instead logging in console would be a better solution, Or at least an option in preferences to disable connection loss/established toast messages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-needs-triage Status: Needs triage T-bug Something isn't working the way it is supposed to
Projects
None yet
Development

No branches or pull requests

3 participants