-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
ArgoCD-Repo-Server does not close https connections to git-server #3522
Comments
Thanks for your brilliant bug report, @Jaydee94! I could reproduce the issue reliably and can confirm it. The repo server is indeed leaking TCP connections for HTTPS repository requests. I'd consider this bug as severe. |
I think I found the root cause, and it was indeed the custom HTTP client implementation that was keeping HTTP connections alive. I just submitted a PR with the fix (#3531) - with this fix applied, TCP connections to Git repositories connected via HTTPS should be closed correctly and in time now, at least they do in my reproduction environment. |
Hi, as we are also running into this issue, I was just curious when this bugfix will be released? Thanks for the great work! |
@szEvEz As far as i know the bugfix is already part of the newest release 1.5.4 |
We've hit the exact same issue, but with regards to |
Checklist:
argocd version
.Describe the bug
We are experiencing problems the argo-cd repo server. The application opens https connection to our git server and does not close them as expected. We have now traced the problem to the worker node where the pod is running. By attaching to the $pid of the pod we can watch the number of open sockets rise continuously.
watch "ls -lah /proc/$pid/fd/ | wc"
Using nsenter we can also get a more detailed overview over the open connections. Here is the output when we run netstat in the argo-repo-server namespace:
To Reproduce
Expected behavior
The repo server opens connections to the git repository and closes the connections after processing.
Version
Our Workaround
We switched to ssh instead of https. Using ssh, the connections to out git server are closed correctly as we would expect.
Maybe the open connections are caused by the "customHTTPClient" from https://github.com/argoproj/argo-cd/blob/9e81c38c13be708cb7f1d280ae93ddeb59131305/util/git/client.go
The text was updated successfully, but these errors were encountered: