From 5530e417428c7d5a3165db65ae4dc9f6086b3eb2 Mon Sep 17 00:00:00 2001 From: Maxim Biro Date: Thu, 18 Oct 2018 04:23:21 -0400 Subject: Increase NOFILE limit for tox-bootstrapd tox-bootstrapd can use around 600 TCP sockets during TCP server's normal functioning. Many systems default to having a soft limit of 1024 open file descriptors, which we are close to reaching, so it was suggested we bump that limit to a higher number. iphy suggested increasing it to 32768. --- .travis/tox-bootstrapd-docker | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to '.travis') diff --git a/.travis/tox-bootstrapd-docker b/.travis/tox-bootstrapd-docker index 7c12a9d0..5dc39628 100755 --- a/.travis/tox-bootstrapd-docker +++ b/.travis/tox-bootstrapd-docker @@ -23,7 +23,7 @@ cat docker/Dockerfile sudo docker build -t tox-bootstrapd docker/ sudo useradd --home-dir /var/lib/tox-bootstrapd --create-home --system --shell /sbin/nologin --comment "Account to run Tox's DHT bootstrap daemon" --user-group tox-bootstrapd sudo chmod 700 /var/lib/tox-bootstrapd -sudo docker run -d --name tox-bootstrapd -v /var/lib/tox-bootstrapd/:/var/lib/tox-bootstrapd/ -p 443:443 -p 3389:3389 -p 33445:33445 -p 33445:33445/udp tox-bootstrapd +sudo docker run -d --name tox-bootstrapd -v /var/lib/tox-bootstrapd/:/var/lib/tox-bootstrapd/ --ulimit nofile=32768:32768 -p 443:443 -p 3389:3389 -p 33445:33445 -p 33445:33445/udp tox-bootstrapd sudo ls -lbh /var/lib/tox-bootstrapd @@ -59,6 +59,12 @@ if [ "`sudo docker inspect -f {{.State.Running}} tox-bootstrapd`" != "true" ]; t exit 1 fi +cat /proc/$(pidof tox-bootstrapd)/limits +if ! cat /proc/$(pidof tox-bootstrapd)/limits | grep -P '^Max open files(\s+)32768(\s+)32768(\s+)files'; then + echo "Error: ulimit is not set to the expected value" + exit 1 +fi + if ! python3 ../fun/bootstrap_node_info.py ipv4 localhost 33445 ; then echo "Error: Unable to get bootstrap node info" exit 1 -- cgit v1.2.3