Allow increasing connection limit on linux (#3799)

With this you can now support more connections on linux, even if your system header is still set to a smaller value.

Make sure to increase the limit of open file handles with ulimit or other resource related settings.
You can change the compile time value of supported connections with ./configure --with-maxconn=value

Windows default is still 4096.
This commit is contained in:
Lemongrass3110
2019-01-09 23:15:33 +01:00
committed by GitHub
parent 4ec0c0109f
commit 8ae788b643
4 changed files with 43 additions and 51 deletions

25
configure vendored
View File

@@ -1367,7 +1367,9 @@ Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-maxconn[=ARG] optionally set the maximum connections the core can
handle (default: 16384) NOT USED YET - EXPERIMENTAL
handle. By default the system header value will be used.
This will only be the compile time limit, make sure
you set the correct limit with ulimit on your OS.
--with-outputlogin[=ARG]
Specify the login-serv output name (defaults to
login-server)
@@ -3469,22 +3471,11 @@ fi
# Check whether --with-maxconn was given.
if test "${with_maxconn+set}" = set; then :
withval=$with_maxconn;
if test "$withval" == "no"; then
CPPFLAGS="$CPPFLAGS -DMAXCONN=16384"
else
if ! test "$withval" -ge 0 -o "$withval" -lt 0 2>&- ; then
as_fn_error $? "Invalid argument --with-maxconn=$withval ... stopping" "$LINENO" 5
else
CPPFLAGS="$CPPFLAGS -DMAXCONN=$withval"
fi
fi
else
CPPFLAGS="$CPPFLAGS -DMAXCONN=16384"
if ! test "$withval" -ge 0 -o "$withval" -lt 0 2>&- ; then
as_fn_error $? "Invalid argument --with-maxconn=$withval ... stopping" "$LINENO" 5
else
CPPFLAGS="$CPPFLAGS -DMAXCONN=$withval"
fi
fi