is nginx has a limit for domain ?

Hi ,

I have a web server with nginx and I have a round 1017 domain works on it ,

I’m using forge service to create a new domain and ssl certification , but now I can’t add any new domain

if I add a new domain I got nginx an error : nginx.service failed because a configured resource limit was exceeded

my nginx configration :
user forge;
worker_processes auto;
worker_rlimit_nofile 65530;
pid /run/;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 65535;
        multi_accept on;

http {
        client_body_timeout 25s;
        # Basic Settings
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 30;
        types_hash_max_size 2048;
        server_tokens off;

        server_names_hash_bucket_size 2048;
        # server_name_in_redirect off;

can anyone help me with this issue .

thank you

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

DigitalOcean Employee
DigitalOcean Employee badge
April 30, 2019
Accepted Answer


It seems that Nginx isn’t immediately giving away useful information in that error. The key will be digging to find something more descriptive. You can try this to see if anything looks relevant:

journalctl -xn --no-pager

You could also try tailing the Nginx log, which is most likely this:

tail /var/log/nginx/error.log

It’s hard to say exactly what you’re looking for, you may know it when you see it.


I found a solution .

1- find the pid of nginx master process

ps ux | grep -i nginx

2- then edit the process id limit file located into nano /proc/nginx_master_process_PID/limits

replace “nginx_master_process_ID” with process pid that you find in step 1

3- increase “Max open files” value

4- save and exit .

This comment has been deleted

    Try DigitalOcean for free

    Click below to sign up and get $200 of credit to try our products over 60 days!

    Sign up

    Featured on Community

    Get our biweekly newsletter

    Sign up for Infrastructure as a Newsletter.

    Hollie's Hub for Good

    Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

    Become a contributor

    Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

    Welcome to the developer cloud

    DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

    Learn more
    DigitalOcean Cloud Control Panel