ocaml-ci
ocaml-ci copied to clipboard
Client failure on flaky connexions
I'm not sure if that should be an issue here or in cohttp, I can redo it elsewhere if so.
When our current internet connexion is a slow and very flaky one (through train wifi for instance), the client terminates on any command involving connecting to the server with the following error message:
ocaml-ci: internal error, uncaught exception:
(Failure
"Failed: TLS connection failed: attempted to write to a closed flow")
If I switch to a more stable connexion (though a shared connexion from my 4G phone for example, it works again)
Ah, so it's you! There's quite a lot of this in the server logs:
2019-10-14 10:34.53 capnp-rpc [WARNING] Rejecting new connection: TLS connection failed: Unix.Unix_error(Unix.ECONNRESET, "read", "")
The web UI contains some code for reconnecting on failure (https://github.com/ocaml-ci/ocaml-ci/blob/master/web-ui/backend.ml) because it's a long-running process, but I wouldn't have thought that would be a big problem for the client (except maybe when tailing logs), because the ocaml-ci client normally only needs to be connected for less than a second.
Still an issue, to fix for streaming logs would require some reconnect logic like backend.ml.