为什么sinatra nginx配方只推荐1名工人?
下面是来自推荐的nginx配置文件的一个片段。请注意与典型nginx设置不同的两个方面:为什么sinatra nginx配方只推荐1名工人?,nginx,sinatra,Nginx,Sinatra,下面是来自推荐的nginx配置文件的一个片段。请注意与典型nginx设置不同的两个方面: 仅指定了1个辅助进程 默认情况下,accept_mutex(通常为打开)处于关闭状态 为什么只有一名员工?如果我们指定更多,会发生什么 accept\u mutex off纯粹是因为只有一个工作线程,还是有其他原因 # this sets the user nginx will run as, #and the number of worker processes user nobody nogroup;
accept\u mutex off
纯粹是因为只有一个工作线程,还是有其他原因
# this sets the user nginx will run as,
#and the number of worker processes
user nobody nogroup;
worker_processes 1;
# setup where nginx will log errors to
# and where the nginx process id resides
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
# set to on if you have more than 1 worker_processes
accept_mutex off;
}
这可能与两者之间的关系无关,只是编写本教程的人使用的是单处理器机器(通常使用Nginx为每个内核分配一个工作进程)。这可能与两者之间的关系无关,事实上,编写本教程的人使用的是单处理器机器(通常使用Nginx为每个内核分配一个工作进程)。啊,这是有道理的。关闭互斥锁之后,只有一个工作进程。。。如果您想将您的评论更改为答案,我将接受。完成,很高兴我能提供帮助!