I am trying to run lighttpd (1.4.35) inside of a Docker container to serve a high-volume static website (no PHP, et al). After a minute of running, the error log fills with :
(server.c.1444) [note] sockets disabled, connection limit reached
I've upped the limits for root
in /etc/security/limits.conf
(and rebooted):
root soft nofile 4096
root hard nofile 32768
And in my docker-compose.yml
(equivalent to --ulimit
on the command line):
ulimits:
nofile:
soft: 4096
hard: 32768
And in my lighttpd.conf
:
server.max-fds = 8192
server.max-connections = 4096
But when I run lsof -n | grep -c lighttpd
I get no higher than 128. If I enter the container and run ulimit -n
I get 4096, as expected. Running ulimit -a
returns:
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 128490
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) unlimited
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
What else am I missing? How do I get lighttpd to accept more than 128 connections?