-
Notifications
You must be signed in to change notification settings - Fork 36
Nginx kills sockets older than 2 hours #31
Comments
Does it continue to work when you re-invoke the command? Additional context, is this through a DNS or local IP? |
Sure, works like a charm when restarting. This is through a non local endpoint although i'd argue DNS has long been resolved at that point. It happened exactly on the 2 hour mark. Is the process keeping a websocket open for the whole time? |
There isn't a web socket connection between CLI client and the server so I am not sure. With the constant data stream, I am not sure why does the client gets killed. In the NGINX config file, we have the following lines to keep the connection opened proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; Is there anyway you can test with the local endpoint or your server cannot be accessed through local IP? |
I'm unfortunately not sure what causes this either, but this kind of error after exactly 2 hours on the second cannot be a coincidence. I am also not using an additional nginx proxy, my deployment is fully native without docker - but with the same configuration as you provided to the docker images. (I just stripped docker from the equation). So the two lines you posted exist verbatim in my config. I could test this locally, but I have no idea what to upload so it takes another 2 hours, I just barely scratched the 2 hour mark this time. I'm open to any ideas. And after, this isn't really a big issue, just a minor nuisance. |
Understood, I'm gonna give this some thought |
I would guess this is probably nginx' keepalive_time, although the default on that is 1h. Were you perhaps running with |
Good catch, that's probably it. I don't remember the exact parameters anymore but there's a possibility that I had used --threads 2. |
IMO this issue is rare enough (only happens when uploading a very large amount of files) and very easy to work around (just run the upload command again) that we don't need to make any changes. We'll have this issue here documenting it in case anybody else encounters it in the future. |
Once files are checksummed on the client I think you are right, but currently it would take the same amount of time to retry, as all files will be reuploaded. |
When running the same CLI tool instance for exactly 2 hours (by uploading many files), the nginx proxy will forcefully terminate the connection. I guess there is some kind of internal auto-kill. Maybe the socket should be reconnected after a while to prevent this from happening.
The text was updated successfully, but these errors were encountered: