Haproxy安裝遇到:[WARNING] 143/145547 (17804) : [sbin/haproxy.main()] FD limit (1048576) too lowfor maxconn=65535/maxsock=131084.Please raise 'ulimit-n' to 131084 or more to avoid any trouble.
在安裝完Haproxy啟動時報錯,諸如:FD limit (65535) too low for maxconn=65535/maxsock=131084.Please raise 'ulimit-n' to 131084 or more to avoid any trouble.遇到此類問題,搜了其他微博的文章,都是修改ulimit -n 65535 之類的。
照網(wǎng)上一些博客說的,有以下方法修改FD值:
1.在/etc/rc.local 中增加一行 ulimit -SHn 65535
2.在/etc/profile 中增加一行 ulimit -SHn 65535
3.在/etc/security/limits.conf
如果在修改完之后依然解決不了。那么:
vim /haproxy/conf/haproxy.cfg
修改所有其中的maxconn 4096配置,在實驗情況下可以將其改的小一些。
一般ulimit 值要比maxconn 4096大兩倍。
作者:xiaomabrother
版權(quán)聲明:本文為博主原創(chuàng)文章,轉(zhuǎn)載請附上博文鏈接!
---------------------

浙公網(wǎng)安備 33010602011771號