Re: nginx hogs cpu on Windows

2017-06-14 Thread Maxim Dounin
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/
___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx


Re: nginx hogs cpu on Windows

2017-06-13 Thread Igal @ Lucee.org
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.

c:\>nginx.exe -V
nginx version: nginx/1.13.1
built by cl 16.00.40219.01 for 80x86
built with OpenSSL 1.0.2l  25 May 2017
TLS SNI support enabled
configure arguments: --with-cc=cl --builddir=objs.msvc8 --with-debug 
--prefix= --conf-path=conf/nginx.conf --pid-path=logs/nginx.pid 
--http-log-path=logs/access.log --error-log-path=logs/error.log 
--sbin-path=nginx.exe 
--http-client-body-temp-path=temp/client_body_temp 
--http-proxy-temp-path=temp/proxy_temp 
--http-fastcgi-temp-path=temp/fastcgi_temp 
--http-scgi-temp-path=temp/scgi_temp 
--http-uwsgi-temp-path=temp/uwsgi_temp --with-cc-opt=-DFD_SETSIZE=1024 
--with-pcre=objs.msvc8/lib/pcre-8.40 
--with-zlib=objs.msvc8/lib/zlib-1.2.11 --with-select_module 
--with-http_v2_module --with-http_realip_module 
--with-http_addition_module --with-http_sub_module 
--with-http_dav_module --with-http_stub_status_module 
--with-http_flv_module --with-http_mp4_module 
--with-http_gunzip_module --with-http_gzip_static_module 
--with-http_auth_request_module --with-http_random_index_module 
--with-http_secure_link_module --with-http_slice_module --with-mail 
--with-stream --with-openssl=objs.msvc8/lib/openssl-1.0.2l 
--with-openssl-opt=no-asm --with-http_ssl_module 
--with-mail_ssl_module --with-stream_ssl_module


Task Manager Performance when problem takes place:

Task Manager Processes when problem takes place:

Task Manager Performance after issuing reload:

Looks like there is a bug somewhere.  I wonder if it is limited to 
Windows or if it's on all distributions.


Thank you,


Igal Sapir
Lucee Core Developer
Lucee.org 



___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx

nginx hogs cpu on Windows

2017-06-12 Thread Igal @ Lucee.org

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.

c:\>nginx.exe -V
nginx version: nginx/1.13.1
built by cl 16.00.40219.01 for 80x86
built with OpenSSL 1.0.2l  25 May 2017
TLS SNI support enabled
configure arguments: --with-cc=cl --builddir=objs.msvc8 --with-debug 
--prefix= --conf-path=conf/nginx.conf --pid-path=logs/nginx.pid 
--http-log-path=logs/access.log --error-log-path=logs/error.log 
--sbin-path=nginx.exe --http-client-body-temp-path=temp/client_body_temp 
--http-proxy-temp-path=temp/proxy_temp 
--http-fastcgi-temp-path=temp/fastcgi_temp 
--http-scgi-temp-path=temp/scgi_temp 
--http-uwsgi-temp-path=temp/uwsgi_temp --with-cc-opt=-DFD_SETSIZE=1024 
--with-pcre=objs.msvc8/lib/pcre-8.40 
--with-zlib=objs.msvc8/lib/zlib-1.2.11 --with-select_module 
--with-http_v2_module --with-http_realip_module 
--with-http_addition_module --with-http_sub_module 
--with-http_dav_module --with-http_stub_status_module 
--with-http_flv_module --with-http_mp4_module --with-http_gunzip_module 
--with-http_gzip_static_module --with-http_auth_request_module 
--with-http_random_index_module --with-http_secure_link_module 
--with-http_slice_module --with-mail --with-stream 
--with-openssl=objs.msvc8/lib/openssl-1.0.2l --with-openssl-opt=no-asm 
--with-http_ssl_module --with-mail_ssl_module --with-stream_ssl_module


Task Manager Performance when problem takes place:

Task Manager Processes when problem takes place:

Task Manager Performance after issuing reload:

Looks like there is a bug somewhere.  I wonder if it is limited to 
Windows or if it's on all distributions.


Thank you,


Igal Sapir
Lucee Core Developer
Lucee.org 

___
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx