8.2.2. Configuring flow-control
For details on how flow-control works, see Section 8.2, Managing incoming and outgoing messages with flow-control. The summary of the main points is as follows:
The syslog-ng application normally reads a maximum of
log-fetch-limit()number of messages from a source.
From TCP and unix-stream sources, syslog-ng reads a maximum of
log-fetch-limit()from every connection of the source. The number of connections to the source is set using the
Every destination has an output buffer (
Flow-control uses a control window to determine if there is free space in the output buffer for new messages. Every source has its own control window, the
log-iw-size()parameter sets the size of the control window.
When a source accepts multiple connections, the size of the control window is divided by the value of the
max-connections()parameter and this smaller control window is applied to each connection of the source.
The output buffer must be larger than the control window of every source that logs to the destination.
If the control window is full, syslog-ng stops reading messages from the source until some messages are successfully sent to the destination.
If the output buffer becomes full, and flow-control is not used, messages may be lost.
If you modify the