docker-zulip
docker-zulip copied to clipboard
Error: The minimum number of file descriptors required to run this process is 40000
Hi,
I am trying to run Zulip with Docker rootless on my server but I get the following error :
zulip_1 | Error: The minimum number of file descriptors required to run this process is 40000 as per the "minfds" command-line argument or config file setting. The current environment will only allow you to open 40000 file descriptors. Either raise the number of usable file descriptors in your environment (see README.rst) or lower the minfds setting in the config file to allow the process to start.
zulip_1 | For help, use /usr/bin/supervisord -h
This happens when removing :
ulimits:
nofile:
soft: 40000
hard: 50000
from the docker-compose file, because I can't use it (getting the following error).
Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "process_linux.go:449: container init caused \"process_linux.go:378: setting rlimits for ready process caused \\\"error setting rlimit type 7: operation not permitted\\\"\"": unknown
Error: failed to start containers
Why are ulimits
needed and do you have an idea on how to solve this problem ?
Thank you
Ulimit definition :
Ulimit is the number of open file descriptors per process. It is a method for restricting the number of various resources a process can consume. Sometimes you will get the error message is like “too many files open “, it is because you have reached the limits of opened files, so you need to increase the ulimit parameters.
The answer is, docker-rootless doesn't work as the classic Docker version. For increasing the ulimit, please refer to this issue.
And remove the ulimits
part from the docker-compose
file.
Important note : in Docker Rootless, ulimits work in process-granularity rather than in container-granularity.
Reopening this since I'd like us to document this issue with docker-rootless
.
I'd have two remarks :
-
Zulip is compatible with Docker rootless. You "just" have to raise your Linux user ulimits (which is not really easy tho).
-
I guess most people don't have "thousands" of users in their Zulip system. So setting the ulimits shouldn't be mandatory by default and should be an option.
@flavienbwk interesting; I wouldn't have expected that to be the only problem. Can you confirm that everything works with that change?
In theory we could add a zulip.conf
setting for this; it's just a bit of work to do so and test doing so.
And it's not thousands of users, it's thousands of open files, which can happen with hundreds of concurrent users.
Good idea. Yes I've been using it with a bit older version of Zulip ( May 9th) without an issue. Tho I didn't use it with a lot of people (~10).
Just a last comment about ulimits : the only container I've seen requesting ulimits is ElasticSearch (at 65000). As a way lighter system, I suspect that Zulip may not need raised ulimits by default.