﻿# Inspect the listening backlog when new requests time out

Linux listen backlog bounds established sockets awaiting accept; inspect its kernel cap and drain rate separately from incomplete handshakes.

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

New connections time out while established inference streams keep working. The listener can be failing to drain its pending-connection queue even though existing sockets and GPUs remain active. On Linux, the application listen backlog concerns established connections waiting for accept; incomplete handshakes have a separate boundary. Preserve that distinction before increasing either limit.

## Locate the listening process

Identify the actual listener, network namespace and forwarding path. A public gateway and a model worker can each listen on different sockets. Connect-stage timing must be assigned to the affected listener rather than the last service named in an application log. Existing keepalive traffic can avoid connection establishment and therefore appear healthy during a problem affecting new callers.

## Separate the two queues

Linux listen documentation distinguishes completely established sockets awaiting acceptance from incomplete connection requests. The supplied backlog describes the former and is capped by somaxconn. The incomplete-handshake setting has different semantics and interacts with SYN-cookie behavior. Increasing one number does not automatically enlarge every stage or explain why a particular application's accept loop is falling behind.

## Inspect queue consumption

The accept call removes a pending connection and creates the connected socket for application handling. Investigate an event loop blocked on unrelated work, delayed acceptance and failures to create the required descriptor. Preserve actual errors and resource limits. A listener can be present in the socket table while making insufficient progress; merely confirming the port is open does not establish healthy acceptance capacity.

## Match bursts to waiting

Compare new-connection arrival bursts, acceptance activity and client connection outcomes over the same interval. Use an isolated workload to distinguish a short burst absorbed by available queue space from persistent arrival above drain capacity. A larger queue may defer rejection while increasing waiting. It does not add application workers, reduce GPU execution time or repair a blocked event loop.

## Verify the effective boundary

Record the application backlog request, kernel cap and running process conditions after any authorized change. Repeat both new connections and established streams. Success means the chosen arrival pattern is accepted within its intended timing boundary, with errors accounted for. Keep this transport admission queue separate from the model scheduler's token backlog, which begins later and consumes different resources.

## Primary references

[Linux listen Backlog Semantics](https://man7.org/linux/man-pages/man2/listen.2.html).

[Linux accept Queue Consumption](https://man7.org/linux/man-pages/man2/accept.2.html).

[Linux IP and TCP Sysctl Semantics](https://docs.kernel.org/networking/ip-sysctl.html).

Related reading: [Bound vLLM request queues and prefill token backlogs](/journal/vllm-admission-token-backlog/); [GPU networking and availability: beyond internet speed](/journal/network-and-uptime/).
