2

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?

koehn
  • 744
  • 1
  • 8
  • 20
  • Possible duplicate of [how to set ulimit / file descriptor on docker container the image tag is phusion/baseimage-docker](http://stackoverflow.com/questions/24318543/how-to-set-ulimit-file-descriptor-on-docker-container-the-image-tag-is-phusion) – Steffen Ullrich Mar 11 '17 at 14:59
  • As I said in my original post, I have set the limits in Docker, albeit using the compose file (as I'm using docker-compose) and not the command line. I edited the post to make this point explicitly. – koehn Mar 11 '17 at 15:55
  • What is the version of `lighttpd` you are using? – Salem Mar 11 '17 at 22:11
  • `lighttpd-1.4.35`. Updated the post. – koehn Mar 12 '17 at 14:59

0 Answers0