﻿# Bound a zero-window sender with TCP_USER_TIMEOUT

TCP_USER_TIMEOUT can bound buffered data blocked by a zero receive window; verify persist state and receiver reads before changing the policy.

Author: Retrivium editorial team
Updated: 2026-11-04
Canonical URL: https://retrivium.ai/journal/guide-net-tcp-zero-window/
Language: en

A server has response bytes buffered, yet the client advertises no receive space. Small probes continue while the response makes no progress. This is compatible with TCP persist behavior rather than a vanished peer. Linux TCP_USER_TIMEOUT can bound relevant untransmitted buffered data, but choosing that boundary does not fix an application that has stopped reading.

## Confirm the persist condition

Follow the client's advertised window and the sender's outstanding work. A zero receive window says the peer currently offers no space for ordinary new data. TCP probes help discover when that window reopens even if a window-update notification was lost. Continuing probe acknowledgments can therefore coexist with a response that never advances toward completion.

## Identify the blocked consumer

Locate the receiving application and any intermediate proxy. A gateway might read upstream while its downstream writer is blocked, or stop upstream reads after its own buffer fills. Observe the affected transport leg rather than assuming the original client directly advertises the window to the model worker. A live process and successful probes do not establish that its application is consuming response bytes.

## Interpret the Linux timeout

The documented option limits how long transmitted data remains unacknowledged or buffered data remains untransmitted because the peer's window is zero. It is not merely an idle-connection lifetime. Preserve the actual option value and socket on which it is set. Check application and library support before assuming a gateway setting reaches both its upstream and downstream connections.

## Separate timing mechanisms

TCP_USER_TIMEOUT does not schedule retransmissions or determine when keepalive probes are emitted. The socket tool's persist timer can help identify the current transport state, but it is not the application's complete request deadline. Keep request cancellation, transport failure and remote computation cleanup as separate outcomes. Closing a blocked socket cannot by itself prove that GPU work has already stopped.

## Test the intended failure policy

In an isolated client, deliberately pause reads and observe buffered data, window behavior, timeout outcome and cleanup. Resume reading in a comparison run to verify recovery before the selected boundary. Report the tradeoff between tolerated receiver pauses and retained server resources. Do not treat a shorter failure interval as higher delivery throughput or as evidence that the receiver-side backpressure was repaired.

## Primary references

[IETF TCP Specification](https://www.rfc-editor.org/rfc/rfc9293.html).

[Linux TCP Socket Options](https://man7.org/linux/man-pages/man7/tcp.7.html).

[Linux ss Socket Statistics and Timers](https://man7.org/linux/man-pages/man8/ss.8.html).

Related reading: [GPU networking and availability: beyond internet speed](/journal/network-and-uptime/); [Graceful inference-server termination with active streams](/journal/provider-graceful-termination-active-streams/).
