如果指定了积压,则Nginx“地址已经在使用”

我正在运行nginx版本:nginx / 1.10.2

我想调整我的默认configuration。 根据https://www.nginx.com/blog/tuning-nginx/我改变了操作系统中的somaxconn参数,并在nginx.conf中指定了相同的

所以我的nginx.conf看起来像

listen 80 backlog=16384; 

但是,当我把backlog =放在nginx.conf中的时候,那么nginx不会以类似的错误开始

 Starting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) nginx: [emerg] still could not bind() [FAILED] 

并删除积压参数nginx工作正常。 如何在nginx中指定更高的积压

这可能会发生,因为你读了另一个虚拟主机与listen声明。 您必须将积压文件添加到所有的listen语句,或者将其绑定到特定的IP地址。