Welcome! Log In Create A New Profile

Advanced

Nginx fails to accept new connection if active worker crashes

November 15, 2011 02:32AM
Hi All

I use nginx configured with multiple workers. I also have an nginx module that crashed due to an error when I noticed that the module crash leaves nginx in a state where it cannot accept new calls.

Removing my module and killing the "active" worker (the one which seems to take the new request) with a SIGHUP again caused nginx to hang. Killing the other worker(s) seem to be working just fine.

Further investigations(with nginx at debug level) showed that all threads are fine but none of the workers are getting the ngx_accept_mutex_lock.

Master tries to release the ngx_accept_mutex_lock if the dead process was holding it [
https://svn.nginx.org/nginx/browser/nginx/trunk/src/os/unix/ngx_process.c?annotate=blame#L503] but doesnt look like the value is set anywhere.

I have been using nginx only for a couple of months now so I am not very sure of the diagnosis, please feel free to correct.


uname -a: Linux faskiri-pc 2.6.32-24-generic #43-Ubuntu SMP Thu Sep 16 14:58:24 UTC 2010 x86_64 GNU/Linux

nginx -V: nginx: nginx version: nginx/1.0.5 nginx: built by gcc 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5) nginx: configure arguments: --without-http_ssi_module --without-http_geo_module --without-http_fastcgi_module --without-http_uwsgi_module --without-http_scgi_module --without-http_memcached_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-pcre --with-debug

I will be grateful for any advice.

Best Regards
+Fasih
Subject Author Posted

Nginx fails to accept new connection if active worker crashes

faskiri.devel November 15, 2011 02:32AM

Re: Nginx fails to accept new connection if active worker crashes

Andrew Alexeev November 15, 2011 04:16AM

Re: Nginx fails to accept new connection if active worker crashes

faskiri.devel November 15, 2011 06:37AM

Re: Nginx fails to accept new connection if active worker crashes

Andrew Alexeev November 15, 2011 08:28AM

Re: Nginx fails to accept new connection if active worker crashes

faskiri.devel November 16, 2011 03:51AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 291
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready