ocaml-ci icon indicating copy to clipboard operation
ocaml-ci copied to clipboard

Client failure on flaky connexions

Open kit-ty-kate opened this issue 6 years ago • 2 comments

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)

kit-ty-kate avatar Oct 14 '19 10:10 kit-ty-kate

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.

talex5 avatar Oct 14 '19 10:10 talex5

Still an issue, to fix for streaming logs would require some reconnect logic like backend.ml.

tmcgilchrist avatar Sep 04 '23 07:09 tmcgilchrist