influxdata/influxdb · warning · Error::ClientHangup
client disconnected
Error message
client disconnected
What it means
`Error::ClientHangup` is raised when the client's TCP connection drops while the server is reading the request body or writing the response; the source underlying cause is boxed into the error payload. It indicates the peer disconnected mid-request, so no HTTP status can be delivered.
Solutions
- Check client-side logs for aborted requests and align client timeouts to exceed the upload duration
- Increase proxy/load-balancer idle and read timeouts (e.g. nginx proxy_read_timeout) for write endpoints
- Implement client retries with backoff for idempotent writes and resume/re-send the payload
- Verify network stability between client and server (no intermediate NAT/proxy dropping idle connections)
Example fix
// before curl --max-time 2 -X POST $URL --data-binary @big.lp // after curl --max-time 120 -X POST $URL --data-binary @big.lp
Defensive patterns
Strategy: retry
Validate before calling
const client = axios.create({ timeout: 120000 }); // ensure timeout > expected upload time
keepAlive agent with generous idle timeout Try / catch
try { await send(); } catch (e) { if (isClientHangup(e)) { await retryWithBackoff(send, 3); } else throw e; } Prevention
- Set client timeouts well above worst-case upload duration
- Increase LB/proxy idle and read timeouts for write endpoints
- Enable keep-alive and retries with backoff in the HTTP client
- Avoid aborting in-flight bulk writes; monitor network stability
When it happens
Trigger: The client closes the connection or times out while a large body upload is in flight, load balancers/proxies with short idle timeouts kill the connection, or the client aborts the request (fetch AbortController, curl --max-time).
Common situations: Long-running writes over flaky networks, idle-timeout mismatches behind nginx/ALB, aggressive client-side timeouts on slow bulk inserts, and k8s probes or retries that abandon requests.
Related errors
- client error
- error fetching plugin from repository
- failed to read the API response bytes
- failed to send request
- hyper error
AI-assisted analysis of influxdata/influxdb@06200ef96b (2026-09-19).
Data as JSON: /api/errors/686e36a847455b00.
Report an issue: GitHub.
Appendix: source
Thrown at influxdb3_server/src/http.rs:220
/// The `Content-Encoding` header is invalid and cannot be read.
#[error("invalid content-encoding header: {0}")]
NonUtf8ContentEncodingHeader(hyper::header::ToStrError),
/// The `Content-Type` header is invalid and cannot be read.
#[error("invalid content-type header: {0}")]
NonUtf8ContentTypeHeader(hyper::header::ToStrError),
/// The specified `Content-Encoding` is not acceptable.
#[error("unacceptable content-encoding: {0}")]
InvalidContentEncoding(String),
/// The specified `Content-Type` is not acceptable.
#[error("unacceptable content-type, expected: {expected}")]
InvalidContentType { expected: mime::Mime },
/// The client disconnected.
#[error("client disconnected")]
ClientHangup(Box<dyn std::error::Error + Send + Sync>),
/// The client sent a request body that exceeds the configured maximum.
#[error("max request size ({0} bytes) exceeded")]
RequestSizeExceeded(usize),
/// Decoding a gzip-compressed stream of data failed.
#[error("error decoding gzip stream: {0}")]
InvalidGzip(std::io::Error),
#[error("invalid mime type ({0})")]
InvalidMimeType(String),
/// DatabaseName validation error.
#[error("error validating database name: {0}")]
InvalidDatabaseName(#[from] DatabaseNameError),
/// Failure to decode the provided line protocol.View on GitHub (pinned to 06200ef96b)