Question

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/nginx.pid;
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.

Accepted Answer

Greetings!

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.

Jarland

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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