Welcome! Log In Create A New Profile

Advanced

Nginx randomly crashes

January 31, 2013 03:48AM
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@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?
SubjectAuthorPosted

Nginx randomly crashes

rg00January 31, 2013 03:48AM

Re: Nginx randomly crashes

Maxim DouninJanuary 31, 2013 06:30AM

Re: Nginx randomly crashes

rg00January 31, 2013 06:38AM

Re: Nginx randomly crashes

Maxim DouninJanuary 31, 2013 07:20AM

Re: Nginx randomly crashes

rg00February 01, 2013 04:45AM

Re: Nginx randomly crashes

Valentin V. BartenevFebruary 01, 2013 05:52AM

Re: Nginx randomly crashes

rg00February 01, 2013 06:07AM

Re: Nginx randomly crashes

Patrick ListsFebruary 01, 2013 06:14AM

Re: Nginx randomly crashes

Valentin V. BartenevFebruary 01, 2013 06:32AM

Re: Nginx randomly crashes

Maxim DouninFebruary 01, 2013 06:36AM

Re: Nginx randomly crashes

rg00February 01, 2013 09:09AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 54
Record Number of Users: 7 on March 06, 2014
Record Number of Guests: 229 on August 01, 2014
Powered by nginx    Powered by FreeBSD    PHP Powered    Powered by Percona     ipv6 ready