diff options
author | Maxim Biro <nurupo.contributions@gmail.com> | 2018-10-18 04:23:21 -0400 |
---|---|---|
committer | Maxim Biro <nurupo.contributions@gmail.com> | 2018-11-04 20:10:09 -0500 |
commit | 5530e417428c7d5a3165db65ae4dc9f6086b3eb2 (patch) | |
tree | 20841e9e9be92bcb0758d19ff7ec6f303a65be2b /.travis | |
parent | b56166f5a6dd2eaef4861c50cbb11b3568aa040e (diff) |
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.
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/tox-bootstrapd-docker | 8 |
1 files changed, 7 insertions, 1 deletions
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 | |||
23 | sudo docker build -t tox-bootstrapd docker/ | 23 | sudo docker build -t tox-bootstrapd docker/ |
24 | 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 | 24 | 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 |
25 | sudo chmod 700 /var/lib/tox-bootstrapd | 25 | sudo chmod 700 /var/lib/tox-bootstrapd |
26 | 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 | 26 | 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 |
27 | 27 | ||
28 | sudo ls -lbh /var/lib/tox-bootstrapd | 28 | sudo ls -lbh /var/lib/tox-bootstrapd |
29 | 29 | ||
@@ -59,6 +59,12 @@ if [ "`sudo docker inspect -f {{.State.Running}} tox-bootstrapd`" != "true" ]; t | |||
59 | exit 1 | 59 | exit 1 |
60 | fi | 60 | fi |
61 | 61 | ||
62 | cat /proc/$(pidof tox-bootstrapd)/limits | ||
63 | if ! cat /proc/$(pidof tox-bootstrapd)/limits | grep -P '^Max open files(\s+)32768(\s+)32768(\s+)files'; then | ||
64 | echo "Error: ulimit is not set to the expected value" | ||
65 | exit 1 | ||
66 | fi | ||
67 | |||
62 | if ! python3 ../fun/bootstrap_node_info.py ipv4 localhost 33445 ; then | 68 | if ! python3 ../fun/bootstrap_node_info.py ipv4 localhost 33445 ; then |
63 | echo "Error: Unable to get bootstrap node info" | 69 | echo "Error: Unable to get bootstrap node info" |
64 | exit 1 | 70 | exit 1 |