nginx hogs cpu on Windows

Maxim Dounin mdounin at mdounin.ru
Wed Jun 14 18:14:39 UTC 2017


Hello!

On Tue, Jun 13, 2017 at 03:13:19PM -0700, Igal @ Lucee.org wrote:

> Downgrading to 1.12.0 did not help.  The server ran fine for about 12 
> hours and then the problem started again.
> 
> 
> On 6/12/2017 3:39 PM, Igal @ Lucee.org wrote:
> >
> > Hello,
> >
> > I've noticed a few times already that after running for some time 
> > nginx hogs a CPU thread.  The machine has 8 CPU threads, so when the 
> > problem happens I see in Task Manager that nginx takes 12% or 13% 
> > (consistent with a full 1/8 of CPU power).
> >
> > Issuing a reload fixes the problem temporarily.

Am I rigth assuming that during CPU hog nginx still working 
normally, that is, processes requests?

If yes, this is likely a run-away event somewhere, triggered again 
and again (and not handled properly).  This is a class of bugs 
sometimes happen when using level-triggered event methods, such as 
poll and select.  It is unlikely to be seen on Unix systems, as 
these are usually have edge-triggered event methods available, 
such as kqueue and epoll.

Debugging might not be trivial, especially on Windows, though 
debug log should help to understand what goes wrong.  Note though 
that debug log will likely be huge, and will grow fast once the 
problem will start to manifest itself.

Just in case, instructions on how to enable debug logging can be 
found here:

http://nginx.org/en/docs/debugging_log.html

-- 
Maxim Dounin
http://nginx.org/


More information about the nginx mailing list