我使用DirectAdmin和Nginx的安装,我有巨大的客户端,我有时看到“Nginx的503错误”,我有3Gb内存与790使用RAM …
而现在我想增加工作者连接,但在这个文件中我没有这个项目:
nano /etc/nginx/nginx.conf
当我手动添加这个项目,我看到下面的错误Nginx重新启动后:
[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
另外当我增加“worker_processes 1;” 到5,重新启动nginx后,看到下面的输出还是1:
[root@server ~]# grep processor /proc/cpuinfo | wc -l 1
下面是我的configuration文件的输出:
#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; }
/proc/cpuinfo显示有关系统中处理器的信息。 它与nginx工作进程无关。 您的问题很可能是由于您的应用程序服务器无法处理您的访问者造成的负载而导致的。
看看你提供的信息,如果我是你,我会聘请一个专业的系统pipe理员来分析这个问题。 不幸的是,你似乎缺乏这么多基本事物的基本知识,自己分析问题需要很长时间。 引导你通过分析不适合这样的问答网站。
此外,您正在使用控制面板软件,并在这里的问题。