0

I using DirectAdmin and Nginx installed, i have huge clients at the moment and i see "Nginx 503 Error" sometimes, and i have 3Gb ram with 790 used ram...

And now i want increase Worker Connections, but in this File i have no this item:

nano /etc/nginx/nginx.conf

and when i add this item manually, i see below error after Nginx restart:

[root@server ~]# service nginx restart
nginx: [emerg] "worker_connections" directive is duplicate in /etc/nginx/nginx-events.conf:1
nginx: configuration file /etc/nginx/nginx.conf test failed

also when i increase "worker_processes 1;" to 5, after restart nginx it see still 1 with below output:

[root@server ~]# grep processor /proc/cpuinfo | wc -l
1

below is my output of configuration file:

#user  nginx;

# The number of worker processes is changed automatically by CustomBuild, according to the number of CPU cores, if it's set to "1"
worker_processes  100;

pid /var/run/nginx.pid;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;

events {
#    worker_connections 1024;
    include /etc/nginx/nginx-events.conf;
}


http {
    include       /etc/nginx/mime.types;

    # For user configurations not maintained by DirectAdmin. Empty by default.
    include /etc/nginx/nginx-includes.conf;

    # Supplemental configuration
    include /etc/nginx/nginx-modsecurity-enable.conf;
    include /etc/nginx/nginx-defaults.conf;
    include /etc/nginx/nginx-gzip.conf;
    include /etc/nginx/directadmin-ips.conf;
    include /etc/nginx/directadmin-settings.conf;
    include /etc/nginx/nginx-vhosts.conf;
    include /etc/nginx/directadmin-vhosts.conf;
}
antonio
  • 1
  • 1
  • 1

1 Answers1

2

/proc/cpuinfo shows information about processors on your system. It has nothing to do with nginx worker processes. Your problems are most likely caused by your application server not being able to handle the load caused by your visitors.

Looking at the information you gave, I would hire a professional sysadmin to perform analysis of this issue if I were you. Unfortunately you seem to lack basic knowledge of so many essential things that analyzing the problem by yourself would take a very long time. Guiding you through the analysis is not suitable for a Q&A site like this.

Furthermore, you are using a control panel software, and questions about those are off-topinc here.

Tero Kilkanen
  • 36,796
  • 3
  • 41
  • 63