enable reuseport then only one worker is working?

meteor8488 nginx-forum at forum.nginx.org
Sun Feb 28 13:52:12 UTC 2016

Hi All,

I just upgrade Nginx from 1.8 o 1.9 on my FreeBSD box.
After I enabled reuseport on my server, it seems now there is one worker
always takes up 100% CPU and all the rest workers are use less than 1% CPU.
In the day time it's OK because my website doesn't have lots of users. But
at night it's very slow.

Active connections: 5716 
server accepts handled requests
 175477 175477 1805645 
Reading: 1 Writing: 698 Waiting: 5541

After I disable reuseport, it seems my website speed is back to normal. Each
worker (18 workers in total) takes up about 10%-15% CPU.

I understand that enable reuseport will disable accept_mutex. But My
understanding is that Nginx will assign work load to different multiple
socket listeners then to different workers. BUt it seems in my environment
all workload was assign to the same worker, even though it's very busy and
the rest are idle.

Did I miss anything in the configuration? or for a busy server, it's better
to use accept_mutex instead of reuseport?

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,264913,264913#msg-264913

More information about the nginx mailing list