Lighttpdのmax-connections

Max-connectionsをただ増やしただけでは、
can’t have more connections than fds/2:
なんてエラーが出ます。

Scientific Linuxに入れて、
デフォルト設定のままで起こったみたい。。。


原因はこれ
http://redmine.lighttpd.net/wiki/lighttpd/Server.max-connectionsDetails
max-connections == max-fds/2 (maybe /3)
どうやら、デフォルトでは
max-connections = 1024
max-fds = 1024

みたい。

max-fdsに関しては

# ulimit -n
1024

確認することができます

なので、1024/2以下になるように
下記のようにすればOK

# vi /etc/lighttpd/lighttpd.conf 
server.max-connections = 512

max-fdsを増やして対応する場合は、

# ulimit -n 2048
#
# vi /etc/lighttpd/lighttpd.conf
server.max-connections = 1024
server.max-fds = 2048

で設定できます。

[tegaki]個人鯖では、1024で十分w[/tegaki]

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

Enter code * Time limit is exhausted. Please reload CAPTCHA.

This site uses Akismet to reduce spam. Learn how your comment data is processed.