rsyslogの『too many tcp sessions - dropping incoming request』メッセージ

rsyslogのログ転送設定を行なっていたところ、
ログ転送の設定を行なっているサーバーの登録数が200台を超えた辺りからsyslog集約サーバーに↓のようなログが出始めました。

/var/log/messages

Jun  6 00:00:01 syslog.sample.com rsyslogd-2079: too many tcp sessions - dropping incoming request [try http://www.rsyslog.com/e/2079 ]

で、syslogに記載のあるURL先に飛ぶと

It is important to note where the directive to increase the connection limit is placed. It must be placed AFTER the module that handles the connections is loaded. If you place it in front of it, you will see an error message (if you look for them ) but the directive does not work. For example (with imtcp):

This does work:

$ModLoad imtcp
$InputTCPMaxSessions 1000 # Maximum TCP sessions (default 200)

while this does NOT work:

$InputTCPMaxSessions 1000 # Maximum TCP sessions (default 200)
$ModLoad imtcp

と書いてあり、解読すると『InputTCPMaxSessions』というオプションを『ModLoad imtcp』モジュールを読み込んだ後に設定しろと書かれている模様。


なるほど、imtcpモジュール読み込みの後にこのオプションを加えればいいのか!


そして早速

/etc/rsyslog.conf

# Provides TCP syslog reception
$ModLoad imtcp.so
$InputTCPServerRun 514
$AllowedSender TCP, 127.0.0.1,10.0.0.0/8

というimtcpモジュールを読み込んでいる箇所の後に
$InputTCPMaxSessions 1000
を追記して↓のようにしました。

# Provides TCP syslog reception
$ModLoad imtcp.so
$InputTCPServerRun 514
$AllowedSender TCP, 127.0.0.1,10.0.0.0/8
$InputTCPMaxSessions 1000

修正後、rsyslogdを再起動。



しかし、依然としてエラーが出ました。。。


解決策は、

# Provides TCP syslog reception
$ModLoad imtcp.so
$InputTCPMaxSessions 1000
$InputTCPServerRun 514
$AllowedSender TCP, 127.0.0.1,10.0.0.0/8

と、$ModLoad imtcp.soのすぐ下に書いてやることで出なくなりました。



rsyslogサーバー、クライアントサーバー共に環境

OS CentOS 6.2 64bit
rsyslog rsyslog-4.6.2-12.el6.x86_64