[GH-ISSUE #1435] worker_connections increase #1115

Closed
opened 2026-02-26 06:35:49 +03:00 by kerem · 3 comments
Owner

Originally created by @PavelkaDavid on GitHub (Sep 27, 2021).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1435

Hi, I have nginx proxy manager running in docker container and it hosts wordpress. In peak time web sometimes throw "500 Internal Server Error".
image

When searching through the error logs I always found this:

[alert] 2190841#2190841: 1024 worker_connections are not enough
[warn] 2190841#2190841: 1024 worker_connections are not enough, reusing connections

I've wanted to increase worker_connections, but I was unlucky as the only possible way is to add it to "/data/nginx/custom/root.conf":

events {
    worker_connections  10024;
}

That resulted into this error: "events" directive is duplicate in /data/nginx/custom/root.conf:1

So I'm out of ideas and replacing /etc/nginx/nginx.conf directly seems sketchy to me. Is there another way?

Thank you.

Originally created by @PavelkaDavid on GitHub (Sep 27, 2021). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/1435 Hi, I have nginx proxy manager running in docker container and it hosts wordpress. In peak time web sometimes throw "500 Internal Server Error". ![image](https://user-images.githubusercontent.com/42189607/134940498-3f713eda-5a2d-4eda-9ef6-285283c3121c.png) When searching through the error logs I always found this: ``` [alert] 2190841#2190841: 1024 worker_connections are not enough [warn] 2190841#2190841: 1024 worker_connections are not enough, reusing connections ``` I've wanted to increase worker_connections, but I was unlucky as the only possible way is to add it to "/data/nginx/custom/root.conf": ``` events { worker_connections 10024; } ``` That resulted into this error: "events" directive is duplicate in /data/nginx/custom/root.conf:1 So I'm out of ideas and replacing /etc/nginx/nginx.conf directly seems sketchy to me. Is there another way? Thank you.
kerem 2026-02-26 06:35:49 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@chaptergy commented on GitHub (Oct 5, 2021):

Unfortunately there is no other way than either to edit the file inside the container each time you update or to mount a different nginx.conf into the container.

<!-- gh-comment-id:934809444 --> @chaptergy commented on GitHub (Oct 5, 2021): Unfortunately there is no other way than either to edit the file inside the container each time you update or to mount a different nginx.conf into the container.
Author
Owner

@jearton commented on GitHub (Mar 10, 2022):

+1

<!-- gh-comment-id:1064326966 --> @jearton commented on GitHub (Mar 10, 2022): +1
Author
Owner

@e3ndr commented on GitHub (Jun 12, 2025):

Don't want to necro, but I came here from Google and solved the issue (cleanly).

In your Docker volume for NPM, there's now a /nginx/custom folder (documented here). I made a file at /nginx/custom/events.conf and put the following contents:

worker_connections  40960;

Hope this helps someone else! ❤️

<!-- gh-comment-id:2965671332 --> @e3ndr commented on GitHub (Jun 12, 2025): Don't want to necro, but I came here from Google and solved the issue (cleanly). In your Docker volume for NPM, there's now a `/nginx/custom` folder (documented [here](https://nginxproxymanager.com/advanced-config/#custom-nginx-configurations)). I made a file at `/nginx/custom/events.conf` and put the following contents: ``` worker_connections 40960; ``` Hope this helps someone else! ❤️
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#1115
No description provided.