[WARNING] 0/0 (0) : [/usr/local/sbin/haproxy.main()] FD limit (4015) too low for maxconn=2000/maxsock=4017. Please raise 'ulimit-n' to 4017 or more to avoid any trouble.
I find it very odd since I read this in haproxy doc:
ulimit-n
Sets the maximum number of per-process file-descriptors to . By
default, it is automatically computed, so it is recommended not to use this
option.
here is the version I use:
# /usr/local/sbin/haproxy -vv
HA-Proxy version 1.8.4-1deb90d 2018/02/08
Copyright 2000-2018 Willy Tarreau <willy@haproxy.org>
Build options :
TARGET = linux2628
CPU = generic
CC = gcc
CFLAGS = -O2 -g -fno-strict-aliasing -Wdeclaration-after-statement -fwrapv -Wno-null-dereference -Wno-unused-label
OPTIONS = USE_ZLIB=1 USE_OPENSSL=1 USE_LUA=1 USE_PCRE=1
Default settings :
maxconn = 2000, bufsize = 16384, maxrewrite = 1024, maxpollevents = 200
Built with OpenSSL version : OpenSSL 1.0.2n 7 Dec 2017
Running on OpenSSL version : OpenSSL 1.0.2n 7 Dec 2017
OpenSSL library supports TLS extensions : yes
OpenSSL library supports SNI : yes
OpenSSL library supports : SSLv3 TLSv1.0 TLSv1.1 TLSv1.2
Built with Lua version : Lua 5.3.4
Built with transparent proxy support using: IP_TRANSPARENT IPV6_TRANSPARENT IP_FREEBIND
Encrypted password support via crypt(3): yes
Built with multi-threading support.
Built with PCRE version : 8.41 2017-07-05
Running on PCRE version : 8.41 2017-07-05
PCRE library supports JIT : no (USE_PCRE_JIT not set)
Built with zlib version : 1.2.11
Running on zlib version : 1.2.11
Compression algorithms supported : identity("identity"), deflate("deflate"), raw-deflate("deflate"), gzip("gzip")
Built with network namespace support.
Available polling systems :
epoll : pref=300, test result OK
poll : pref=200, test result OK
select : pref=150, test result OK
Total: 3 (3 usable), will use epoll.
Available filters :
[SPOE] spoe
[COMP] compression
[TRACE] trace
Is it a bug in haproxy or something I am doing wrong ?
Since I run this through systemd I have also set up the following:
[root@haproxy03 ~]# cat /etc/systemd/system/haproxy.service.d/90-limits.conf
# This file managed by Puppet - DO NOT EDIT
[Service]
LimitNOFILE=1000100
Those are the /var/log/messages:
un 14 11:47:14 haproxy03 systemd: Starting HAProxy Load Balancer...
Jun 14 11:47:14 haproxy03 haproxy: [WARNING] 164/114714 (4255) : [/usr/sbin/haproxy.main()] Ca
nnot raise FD limit to 2000272, limit is 65536.
Jun 14 11:47:14 haproxy03 haproxy: [WARNING] 164/114714 (4255) : [/usr/sbin/haproxy.main()] FD
limit (65536) too low for maxconn=1000100/maxsock=2000272. Please raise 'ulimit-n' to 2000272
or more to avoid any trouble.
Jun 14 11:47:14 haproxy03 systemd: Started HAProxy Load Balancer.