Operations

Size limits, queues and connection bursts

Distinguish clients from listeners, calculate stream traffic and tune queue, burst and timeout settings using evidence from an Icecast test.

On this page

A connection cap and a stream buffer are different controls. Increasing either blindly can hide a failing source or consume resources without fixing playback. First determine whether the problem affects every listener, a single network path or only new connections.

Read each limit in its own unit

SettingMeaningCommon mistake
limits/clientsConcurrent client connections, including web and admin requestsTreating it as a pure audience cap
limits/sourcesAllowed active sources, including active relaysCounting only encoders
mount/max-listenersListener ceiling for one mountExpecting it to raise the server limit
queue-sizeStream queue size in bytesReading it as seconds
burst-sizeBytes initially offered to a new listenerSetting it above the queue
source-timeoutAllowed source silence in secondsUsing it to repair a broken connection
header-timeoutTime allowed for the incoming request headerConfusing it with playback buffering

The old threadpool example is historical, and client-timeout is described as unused in the documentation. Neither is a useful first tuning control for a current installation.

Use a small, explicit change

This excerpt replaces the corresponding values inside an existing <limits> block. It is an example to evaluate, not a sizing recommendation for every station:

xml · Code example
<queue-size>524288</queue-size>
<burst-size>65536</burst-size>
<source-timeout>10</source-timeout>

Keep the burst below the queue size. A player can still maintain its own buffer, so changing the server’s burst does not prescribe end-to-end latency. A larger queue lets a slow listener lag further behind and consumes memory; it does not increase that listener’s available network bandwidth.

Estimate, measure, compare

As a simplified calculation, 200 listeners receiving 128 kbit/s require 25.6 Mbit/s of media payload before protocol overhead. This is arithmetic, not a tested server capacity. Add relay traffic and other activity when planning the actual network.

Record listener counts, source continuity and slow-listener statistics before changing one value. Reproduce the failure with the same media and player. If all listeners stall together, check source delivery before increasing queues. If only one listener is removed, inspect its connection and elapsed lag. Retain the old configuration so a change can be reversed.

Sources