-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Client disconnects if idle and server is behind Nginx #35
Comments
I've just set MovieNight up behind nginx, and I'm having this issue. Is there a particular nginx option or header that needs to be added? |
Here is my Nginx conf, may you find something useful..
|
@MrAureliusR Do you have any log output? Can you post your Nginx config (remove IP addresses if necessary)? |
Here's what I came up with for the nginx config. I couldn't see anything in the readme about MovieNight requiring anything special, so I started off with just proxy_pass and then added a few other bits and pieces I've used when proxying other applications. The MovieNight log doesn't show anything when this happens -- it just shows the user leaving the chat. After some more experimenting last night, I ended up adding
and that has fixed the issue, but that's kind of an ugly way to solve it.
|
Hmm, the only real differences I have from your config are that I separated out websocket connections into their own block and set the
Do you have anything in your Nginx logs? |
Would that actually make a difference?
…On Mar. 27, 2022, 16:32, at 16:32, Nick ***@***.***> wrote:
Hmm, the only real differences I have from your config are that I
separated out websocket connections into their own block and set the
`proxy_http_version` to `1.1` in the websocket block:
```
location / {
proxy_pass http://movienight;
}
location /ws {
proxy_pass http://movienight;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
```
--
Reply to this email directly or view it on GitHub:
#35 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
I think what happened was in the removal of wasm I forgot to convert this line over to the javascript, so now there's nothing to keep the websocket connection open |
Turns out nginx times out websocket connections at 60 seconds http://nginx.org/en/docs/http/websocket.html |
@MrAureliusR I worked with someone else to check the fix in PR #182. I'm pretty sure this is solved we can reopen the issue if you still have it |
Or not, seems like they didn't change the nginx config back to the original setup that broke it |
Mine is set up as a docker container. If there's a docker image I can pull and test quickly I'd be happy to do so.
…On Mar. 28, 2022, 00:22, at 00:22, joeyak ***@***.***> wrote:
Or not, seems like they didn't change the nginx config back to the
original setup that broke it
--
Reply to this email directly or view it on GitHub:
#35 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
I am not 100% certain on this one but you SHOULD be able to just git pull and then restart the container (maybe rebuild the container to be save). |
The chat client will disconnect if it is behind an Nginx reverse-proxy if no messages are sent within about a minute.
The client should send a PING to the server to keep the connection alive. The server needs to read the PING from the client, but I don't think it needs to respond with a PONG to keep the connection open.
The text was updated successfully, but these errors were encountered: