fix(proxy): raise nginx worker rlimit above worker_connections
nginx inherited systemd's soft LimitNOFILE of 1024, so every start logged "2048 worker_connections exceed open file resource limit: 1024" and the worker_connections value could not actually be reached. Set worker_rlimit_nofile to 65536. Bounded from above by a systemd drop-in at /etc/systemd/system/nginx.service.d/override.conf (LimitNOFILE=65536), since the master's hard limit caps what workers may request.
This commit is contained in:
1 parent
a6cc3cafa9
commit
e3c010f383
1 file changed
+5
@@ -12,6 +12,11 @@
|
||||
|
||||
user www-data;
|
||||
worker_processes auto;
|
||||
# Raise the file-descriptor rlimit for the workers. Must stay <= the master's
|
||||
# RLIMIT_NOFILE *hard* limit, otherwise nginx refuses to start with
|
||||
# "setrlimit(RLIMIT_NOFILE) failed". Bounded from above by the systemd drop-in
|
||||
# /etc/systemd/system/nginx.service.d/override.conf (LimitNOFILE=65536).
|
||||
worker_rlimit_nofile 65536;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
|
||||
Reference in new issue
Block a user