git2go
git2go copied to clipboard
Frequent "SSH could not read data: Error waiting on socket" errors
We use libgit2
and git2go
a bit different than most other projects I have seen putting it to use (in the public domain), in that we have a long running process which continuously spawns new (temporary) repository objects to perform cloning operations. For some time now, a group of users complains about seeing frequent (but not constant) SSH could not read data: Error waiting on socket
errors during clone attempts.
To ensure it was not due to our (initially hasty) implementation of libgit2
and git2go
, we spend time the past weeks to ensure we work with git2go
in a way it likes to be handled. By e.g. ensuring that we properly Free
objects, and by informing the transports they should close connections once they reach a defined timeout (in the hope this would maybe signal something in the C library to do something socket related).
The error however remains, and I am not sure in what direction we should look next to attempt to solve it. Given this, and due to Go native transport still not working properly in combination with authentication, it would be great if I could receive some guidance to at least explain why this error occurs, and if there is anything that could be done about it (and if it requires a PR, I would be happy to submit this).
Our git2go
wrapping code (for more context) can be found in: https://github.com/fluxcd/source-controller/tree/main/pkg/git/libgit2
Hi,
Any updates on this issue ? It is affecting fluxcd image automation controller since some time.