Skip to content
Latchkey

curl Exit Code 56 in CI: Failure Receiving Network Data

curl exit code 56 means a failure while receiving data - the connection was reset or dropped mid-transfer.

A step exiting 56 from curl started receiving a response but the connection broke before it finished.

What it means

Exit 56 is curl's CURLE_RECV_ERROR. A network receive failed - typically "connection reset by peer" from the server, a proxy, or the network dropping the stream.

Common causes

  • The server reset the connection (RST) mid-response.
  • A proxy/firewall idle-timeout closed the stream.
  • Network instability or packet loss.

How to fix it

Add --retry for resilience and check proxy/idle-timeout settings. Connection resets are usually transient infrastructure failures - Latchkey auto-retries this mechanical class rather than failing the run.

Reading exit codes in CI

  • A shell reports 128 + N when a process is terminated by signal N: 137 is SIGKILL (usually the out-of-memory killer), 143 is SIGTERM, 130 is SIGINT.
  • Exit code 137 in a container almost always means the kernel killed it for memory. Nothing in the application log will explain it.
  • A pipeline reports the exit status of its LAST command unless pipefail is set, which is how a failing command piped to tee produces a green build.
  • Some tools use non-zero codes for non-failure outcomes. Check the tool documentation before treating any non-zero code as an error.

Frequently asked questions

curl Exit Code 56 in CI: Failure Receiving Network Data?
A step exiting 56 from curl started receiving a response but the connection broke before it finished.
What it means?
Exit 56 is curl's CURLE_RECV_ERROR. A network receive failed - typically "connection reset by peer" from the server, a proxy, or the network dropping the stream.
How to fix it?
Add --retry for resilience and check proxy/idle-timeout settings. Connection resets are usually transient infrastructure failures - Latchkey auto-retries this mechanical class rather than failing the run.

Related guides

References

Run this faster and cheaper on Latchkey managed runners - self-healing included. Start free → 30-day trial · No credit card