Nginx randomly crashes

rg00 nginx-forum at nginx.us
Thu Jan 31 08:48:31 UTC 2013


I've got a problem with Nginx running on Ubuntu 12.10.
I'm running it mainly as a reverse proxy and there is no high load on the
machine.
It randomly crashes without any helpful log info (or at least I think so).

Here's the error log
***************************************************************************************************
2013/01/31 09:19:03 [debug] 15238#0: *10555 event timer del: 68:
1359620363778
2013/01/31 09:19:03 [debug] 15238#0: *10555 generic phase: 0
2013/01/31 09:19:03 [debug] 15238#0: *10555 rewrite phase: 1
2013/01/31 09:19:03 [debug] 15238#0: *10555 http script regex: "^(.*)"
2013/01/31 09:19:03 [notice] 15238#0: *10555 "^(.*)" matches "/", client:
192.168.2.42, server: abc.def.com, request: "HEAD / HTTP/1.1", host: "
abc.def.com"
2013/01/31 09:19:03 [debug] 15238#0: *10555 http script copy:
"https://abc.def.com"
2013/01/31 09:19:03 [debug] 15238#0: *10555 http script regex end
2013/01/31 09:19:03 [notice] 15238#0: *10555 rewritten redirect:
"https://abc.def.com", client: 192.168.2.42, server: abc.def.com, reques
t: "HEAD / HTTP/1.1", host: "abc.def.com"
2013/01/31 09:19:03 [debug] 15238#0: *10555 http finalize request: 301, "/?"
a:1, c:1
2013/01/31 09:19:03 [debug] 15238#0: *10555 http special response: 301,
"/?"
2013/01/31 09:19:03 [debug] 15238#0: *10555 http set discard body
2013/01/31 09:19:03 [debug] 15238#0: *10555 xslt filter header
2013/01/31 09:19:03 [debug] 15238#0: *10555 HTTP/1.1 301 Moved Permanently
Server: nginx/1.2.6
Date: Thu, 31 Jan 2013 08:19:03 GMT
Content-Type: text/html
Content-Length: 184
Connection: keep-alive
Location: https://abc.def.com

2013/01/31 09:19:03 [debug] 15238#0: *10555 write new buf t:1 f:0
00000000027A0868, pos 00000000027A0868, size: 200 file: 0, size: 0
2013/01/31 09:19:03 [debug] 15238#0: *10555 http write filter: l:1 f:0
s:200
2013/01/31 09:19:03 [debug] 15238#0: *10555 http write filter limit 0
2013/01/31 09:19:03 [debug] 15238#0: *10555 writev: 200
2013/01/31 09:19:03 [debug] 15238#0: *10555 http write filter
0000000000000000
2013/01/31 09:19:03 [debug] 15238#0: *10555 http finalize request: 0, "/?"
a:1, c:1
2013/01/31 09:19:03 [debug] 15238#0: *10555 set http keepalive handler
2013/01/31 09:19:03 [debug] 15238#0: *10555 http close request
2013/01/31 09:19:03 [debug] 15238#0: *10555 http log handler
2013/01/31 09:19:03 [debug] 15238#0: *10555 free: 000000000279FBA0, unused:
360
2013/01/31 09:19:03 [debug] 15238#0: *10555 event timer add: 68:
30000:1359620373779
2013/01/31 09:19:03 [debug] 15238#0: *10555 free: 00000000027DE460
2013/01/31 09:19:03 [debug] 15238#0: *10555 free: 0000000002652060
2013/01/31 09:19:03 [debug] 15238#0: *10555 hc free: 0000000000000000 0
2013/01/31 09:19:03 [debug] 15238#0: *10555 hc busy: 0000000000000000 0
2013/01/31 09:19:03 [debug] 15238#0: *10555 tcp_nodelay
2013/01/31 09:19:03 [debug] 15238#0: *10555 reusable connection: 1
2013/01/31 09:19:03 [debug] 15238#0: *10555 post event 00000000025B5210
2013/01/31 09:19:03 [debug] 15238#0: *10555 delete posted event
00000000025B5210
2013/01/31 09:19:03 [debug] 15238#0: *10555 http keepalive handler
2013/01/31 09:19:03 [debug] 15238#0: *10555 malloc: 0000000002652060:8192
2013/01/31 09:19:03 [debug] 15238#0: *10555 recv: fd:68 -1 of 8192
2013/01/31 09:19:03 [debug] 15238#0: *10555 recv() not ready (11: Resource
temporarily unavailable)
2013/01/31 09:19:03 [debug] 15238#0: *10555 free: 0000000002652060
2013/01/31 09:19:03 [debug] 15238#0: *10555 http keepalive handler
2013/01/31 09:19:03 [debug] 15238#0: *10555 malloc: 0000000002652060:8192
2013/01/31 09:19:03 [debug] 15238#0: *10555 recv: fd:68 0 of 8192
2013/01/31 09:19:03 [info] 15238#0: *10555 client 192.168.2.42 closed
keepalive connection
2013/01/31 09:19:03 [debug] 15238#0: *10555 close http connection: 68
2013/01/31 09:19:03 [debug] 15238#0: *10555 event timer del: 68:
1359620373779
2013/01/31 09:19:03 [debug] 15238#0: *10555 reusable connection: 0
2013/01/31 09:19:03 [debug] 15238#0: *10555 free: 0000000002652060
2013/01/31 09:19:03 [debug] 15238#0: *10555 free: 0000000000000000
2013/01/31 09:19:03 [debug] 15238#0: *10555 free: 000000000283EBF0, unused:
8
2013/01/31 09:19:03 [debug] 15238#0: *10555 free: 00000000027F9CF0, unused:
128
2013/01/31 09:24:49 [alert] 15237#0: worker process 15238 exited on signal
9
*************************************************************************************************************************

At 09:24 I restarted the service because it was hanging.
This is some system info about tcp connections:

Thu Jan 31 09:18:01 CET 2013
     14 ESTABLISHED
      3 FIN_WAIT2  
      6 LISTEN     
     21 TIME_WAIT

Thu Jan 31 09:19:01 CET 2013
     28 ESTABLISHED
      6 LISTEN     
     12 TIME_WAIT

Thu Jan 31 09:20:01 CET 2013
     13 CLOSE_WAIT 
     28 ESTABLISHED
      6 LISTEN

Thu Jan 31 09:21:01 CET 2013
     35 CLOSE_WAIT 
     36 ESTABLISHED
      8 LISTEN  

Thu Jan 31 09:22:01 CET 2013
     46 CLOSE_WAIT 
     35 ESTABLISHED
      7 LISTEN 

Thu Jan 31 09:23:01 CET 2013
     80 CLOSE_WAIT 
     33 ESTABLISHED
      7 LISTEN 

Thu Jan 31 09:24:01 CET 2013
    128 CLOSE_WAIT 
     26 ESTABLISHED
      7 LISTEN     
      8 SYN_RECV 

Thu Jan 31 09:25:02 CET 2013
     26 ESTABLISHED
      1 FIN_WAIT1  
      7 LISTEN     
      4 TIME_WAIT  


During that time I tried to connect with curl and this is the output:
roberto at t500:~> curl -I -L -k -m 30 http://abc.def.com                      
                                                                            
                 
curl: (28) Operation timed out after 30001 milliseconds with 0 bytes
received 

I upgraded Ubuntu package from 1.2.1 to 1.2.6 but no result. In
/var/log/syslog I have no info about this.

What can I do?

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



More information about the nginx mailing list