-
Notifications
You must be signed in to change notification settings - Fork 4
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
Close HTTP response when retrying on errors #5
Conversation
This attempts to fix the problem described in https://forum.duplicacy.com/t/cannot-check-chunks-socket-too-many-open-files/7385 which seems to occur when the Dropbox client retries on certain errors (401, 429, 500). In these cases, the client retries with another HTTP request, but it fails to close the existing one. Eventually, this leaks sockets and the process runs out of sockets.
This pull request has been mentioned on Duplicacy Forum. There might be relevant details there: https://forum.duplicacy.com/t/cannot-check-chunks-socket-too-many-open-files/7385/3 |
Could this also be fix for the Storj ‘too many files’ issue? |
The issue may be conceptually related or even the same as this one, but it's not possible that this PR fixes it. This change is in the Dropbox Go API wrapper, and Duplicacy uses an entirely different storage implementation for Storj: https://github.com/gilbertchen/duplicacy/blob/master/src/duplicacy_storjstorage.go#L16 |
@gilbertchen would you mind reviewing this PR? |
This looks good. Thank you very much for fixing it! |
This pull request has been mentioned on Duplicacy Forum. There might be relevant details there: https://forum.duplicacy.com/t/backup-to-dropbox-aborts-on-synology-due-to-too-many-open-files/7733/1 |
This pull request has been mentioned on Duplicacy Forum. There might be relevant details there: https://forum.duplicacy.com/t/cli-release-3-2-0-is-now-available/7952/1 |
This pull request has been mentioned on Duplicacy Forum. There might be relevant details there: https://forum.duplicacy.com/t/duplicacy-cli-3-2-2-release/8019/1 |
This attempts to fix the problem described in https://forum.duplicacy.com/t/cannot-check-chunks-socket-too-many-open-files/7385 which seems to occur when the Dropbox client retries on certain errors (401, 429, 500). In these cases, the client retries with another HTTP request, but it fails to close the existing one. Eventually, this leaks sockets and the process runs out of sockets.