Skip to content

Instantly share code, notes, and snippets.

@feuGeneA
Created July 11, 2014 16:46
Show Gist options
  • Save feuGeneA/6fc824fd543fc0a59d2a to your computer and use it in GitHub Desktop.
Save feuGeneA/6fc824fd543fc0a59d2a to your computer and use it in GitHub Desktop.
$ cat t/servroot/logs/access.log
127.0.0.1 - - [11/Jul/2014:12:42:50 -0400] "GET / HTTP/1.1" 502 183 "-" "Test::Nginx::LWP"
$ cat t/servroot/logs/error.log
2014/07/11 12:42:50 [debug] 221#0: bind() 0.0.0.0:1984 #7
2014/07/11 12:42:50 [notice] 221#0: using the "kqueue" event method
2014/07/11 12:42:50 [notice] 221#0: nginx/1.6.0
2014/07/11 12:42:50 [notice] 221#0: built by clang 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
2014/07/11 12:42:50 [notice] 221#0: OS: Darwin 13.2.0
2014/07/11 12:42:50 [notice] 221#0: hw.ncpu: 8
2014/07/11 12:42:50 [notice] 221#0: net.inet.tcp.sendspace: 131072
2014/07/11 12:42:50 [notice] 221#0: kern.ipc.somaxconn: 128
2014/07/11 12:42:50 [notice] 221#0: getrlimit(RLIMIT_NOFILE): 256:9223372036854775807
2014/07/11 12:42:50 [debug] 222#0: write: 8, 00007FFF54E857E0, 4, 0
2014/07/11 12:42:50 [debug] 222#0: malloc: 00007FD3D8804600:16384
2014/07/11 12:42:50 [debug] 222#0: malloc: 00007FD3D8808600:16384
2014/07/11 12:42:50 [debug] 222#0: malloc: 00007FD3D880C600:16384
2014/07/11 12:42:50 [debug] 222#0: malloc: 00007FD3D8810600:13824
2014/07/11 12:42:50 [debug] 222#0: malloc: 00007FD3D8813C00:7168
2014/07/11 12:42:50 [debug] 222#0: malloc: 00007FD3D8815800:7168
2014/07/11 12:42:50 [debug] 222#0: kevent set event: 7: ft:-1 fl:0005
2014/07/11 12:42:50 [debug] 222#0: worker cycle
2014/07/11 12:42:50 [debug] 222#0: kevent timer: -1, changes: 1
2014/07/11 12:42:50 [debug] 222#0: kevent events: 1
2014/07/11 12:42:50 [debug] 222#0: kevent: 7: ft:-1 fl:0005 ff:00000000 d:1 ud:00007FD3D8813C00
2014/07/11 12:42:50 [debug] 222#0: accept on 0.0.0.0:1984, ready: 1
2014/07/11 12:42:50 [debug] 222#0: posix_memalign: 00007FD3D8600170:256 @16
2014/07/11 12:42:50 [debug] 222#0: *1 accept: 127.0.0.1 fd:8
2014/07/11 12:42:50 [debug] 222#0: posix_memalign: 00007FD3D8600270:256 @16
2014/07/11 12:42:50 [debug] 222#0: *1 event timer add: 8: 60000:1405097030232
2014/07/11 12:42:50 [debug] 222#0: *1 reusable connection: 1
2014/07/11 12:42:50 [debug] 222#0: *1 kevent set event: 8: ft:-1 fl:0025
2014/07/11 12:42:50 [debug] 222#0: timer delta: 150
2014/07/11 12:42:50 [debug] 222#0: posted events 0000000000000000
2014/07/11 12:42:50 [debug] 222#0: worker cycle
2014/07/11 12:42:50 [debug] 222#0: kevent timer: 60000, changes: 1
2014/07/11 12:42:50 [debug] 222#0: kevent events: 1
2014/07/11 12:42:50 [debug] 222#0: kevent: 8: ft:-1 fl:0025 ff:00000000 d:117 ud:00007FD3D8813C70
2014/07/11 12:42:50 [debug] 222#0: *1 http wait request handler
2014/07/11 12:42:50 [debug] 222#0: *1 malloc: 00007FD3D8817400:1024
2014/07/11 12:42:50 [debug] 222#0: *1 recv: eof:0, avail:117, err:0
2014/07/11 12:42:50 [debug] 222#0: *1 recv: fd:8 117 of 1024
2014/07/11 12:42:50 [debug] 222#0: *1 reusable connection: 0
2014/07/11 12:42:50 [debug] 222#0: *1 posix_memalign: 00007FD3D8817800:4096 @16
2014/07/11 12:42:50 [debug] 222#0: *1 http process request line
2014/07/11 12:42:50 [debug] 222#0: *1 http request line: "GET / HTTP/1.1"
2014/07/11 12:42:50 [debug] 222#0: *1 http uri: "/"
2014/07/11 12:42:50 [debug] 222#0: *1 http args: ""
2014/07/11 12:42:50 [debug] 222#0: *1 http exten: ""
2014/07/11 12:42:50 [debug] 222#0: *1 http process request header line
2014/07/11 12:42:50 [debug] 222#0: *1 http header: "TE: deflate,gzip;q=0.3"
2014/07/11 12:42:50 [debug] 222#0: *1 http header: "Connection: TE, close"
2014/07/11 12:42:50 [debug] 222#0: *1 http header: "Host: localhost:1984"
2014/07/11 12:42:50 [debug] 222#0: *1 http header: "User-Agent: Test::Nginx::LWP"
2014/07/11 12:42:50 [debug] 222#0: *1 http header done
2014/07/11 12:42:50 [debug] 222#0: *1 event timer del: 8: 1405097030232
2014/07/11 12:42:50 [debug] 222#0: *1 generic phase: 0
2014/07/11 12:42:50 [debug] 222#0: *1 rewrite phase: 1
2014/07/11 12:42:50 [debug] 222#0: *1 test location: "/"
2014/07/11 12:42:50 [debug] 222#0: *1 using configuration "/"
2014/07/11 12:42:50 [debug] 222#0: *1 http cl:-1 max:31457280
2014/07/11 12:42:50 [debug] 222#0: *1 rewrite phase: 3
2014/07/11 12:42:50 [debug] 222#0: *1 rewrite phase: 4
2014/07/11 12:42:50 [debug] 222#0: *1 post rewrite phase: 5
2014/07/11 12:42:50 [debug] 222#0: *1 generic phase: 6
2014/07/11 12:42:50 [debug] 222#0: *1 generic phase: 7
2014/07/11 12:42:50 [debug] 222#0: *1 generic phase: 8
2014/07/11 12:42:50 [debug] 222#0: *1 access phase: 9
2014/07/11 12:42:50 [debug] 222#0: *1 access phase: 10
2014/07/11 12:42:50 [debug] 222#0: *1 post access phase: 11
2014/07/11 12:42:50 [debug] 222#0: *1 posix_memalign: 00007FD3D8818800:4096 @16
2014/07/11 12:42:50 [debug] 222#0: *1 http init upstream, client timer: 0
2014/07/11 12:42:50 [debug] 222#0: *1 kevent set event: 8: ft:-2 fl:0025
2014/07/11 12:42:50 [debug] 222#0: *1 http script copy: "Host: www.taobao.com
"
2014/07/11 12:42:50 [debug] 222#0: *1 http script copy: "Connection: close
"
2014/07/11 12:42:50 [debug] 222#0: *1 http script copy: ""
2014/07/11 12:42:50 [debug] 222#0: *1 http script copy: ""
2014/07/11 12:42:50 [debug] 222#0: *1 http proxy header: "TE: deflate,gzip;q=0.3"
2014/07/11 12:42:50 [debug] 222#0: *1 http proxy header: "User-Agent: Test::Nginx::LWP"
2014/07/11 12:42:50 [debug] 222#0: *1 http proxy header:
"GET / HTTP/1.0
Host: www.taobao.com
Connection: close
TE: deflate,gzip;q=0.3
User-Agent: Test::Nginx::LWP
"
2014/07/11 12:42:50 [debug] 222#0: *1 http cleanup add: 00007FD3D8818E50
2014/07/11 12:42:50 [debug] 222#0: *1 get rr peer, try: 1
2014/07/11 12:42:50 [debug] 222#0: *1 socket 9
2014/07/11 12:42:50 [debug] 222#0: *1 connect to 127.0.0.1:80, fd:9 #2
2014/07/11 12:42:50 [debug] 222#0: *1 kevent set event: 9: ft:-1 fl:0025
2014/07/11 12:42:50 [debug] 222#0: *1 kevent set event: 9: ft:-2 fl:0025
2014/07/11 12:42:50 [debug] 222#0: *1 http upstream connect: -2
2014/07/11 12:42:50 [debug] 222#0: *1 posix_memalign: 00007FD3D84048E0:128 @16
2014/07/11 12:42:50 [debug] 222#0: *1 event timer add: 9: 60000:1405097030259
2014/07/11 12:42:50 [debug] 222#0: *1 http finalize request: -4, "/?" a:1, c:2
2014/07/11 12:42:50 [debug] 222#0: *1 http request count:2 blk:0
2014/07/11 12:42:50 [debug] 222#0: timer delta: 27
2014/07/11 12:42:50 [debug] 222#0: posted events 0000000000000000
2014/07/11 12:42:50 [debug] 222#0: worker cycle
2014/07/11 12:42:50 [debug] 222#0: kevent timer: 60000, changes: 3
2014/07/11 12:42:50 [debug] 222#0: kevent events: 3
2014/07/11 12:42:50 [debug] 222#0: kevent: 8: ft:-2 fl:0025 ff:00000000 d:146988 ud:00007FD3D8815870
2014/07/11 12:42:50 [debug] 222#0: *1 http run request: "/?"
2014/07/11 12:42:50 [debug] 222#0: *1 http upstream check client, write event:1, "/"
2014/07/11 12:42:50 [debug] 222#0: kevent: 9: ft:-1 fl:8025 ff:0000003D d:0 ud:00007FD3D8813CE0
2014/07/11 12:42:50 [debug] 222#0: *1 http upstream request: "/?"
2014/07/11 12:42:50 [debug] 222#0: *1 http upstream process header
2014/07/11 12:42:50 [error] 222#0: *1 kevent() reported that connect() failed (61: Connection refused) while connecting to upstream, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:80/", host: "localhost:1984"
2014/07/11 12:42:50 [debug] 222#0: *1 http next upstream, 2
2014/07/11 12:42:50 [debug] 222#0: *1 free rr peer 1 4
2014/07/11 12:42:50 [debug] 222#0: *1 finalize http upstream request: 502
2014/07/11 12:42:50 [debug] 222#0: *1 finalize http proxy request
2014/07/11 12:42:50 [debug] 222#0: *1 close http upstream connection: 9
2014/07/11 12:42:50 [debug] 222#0: *1 free: 00007FD3D84048E0, unused: 48
2014/07/11 12:42:50 [debug] 222#0: *1 event timer del: 9: 1405097030259
2014/07/11 12:42:50 [debug] 222#0: *1 reusable connection: 0
2014/07/11 12:42:50 [debug] 222#0: *1 http finalize request: 502, "/?" a:1, c:1
2014/07/11 12:42:50 [debug] 222#0: *1 http special response: 502, "/?"
2014/07/11 12:42:50 [debug] 222#0: *1 http subs filter header "/"
2014/07/11 12:42:50 [debug] 222#0: *1 malloc: 00007FD3D8819800:32768
2014/07/11 12:42:50 [debug] 222#0: *1 malloc: 00007FD3D8821800:32768
2014/07/11 12:42:50 [debug] 222#0: *1 HTTP/1.1 502 Bad Gateway
Server: nginx/1.6.0
Date: Fri, 11 Jul 2014 16:42:50 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: close
2014/07/11 12:42:50 [debug] 222#0: *1 write new buf t:1 f:0 00007FD3D88190B8, pos 00007FD3D88190B8, size: 158 file: 0, size: 0
2014/07/11 12:42:50 [debug] 222#0: *1 http write filter: l:0 f:0 s:158
2014/07/11 12:42:50 [debug] 222#0: *1 http output filter "/?"
2014/07/11 12:42:50 [debug] 222#0: *1 http copy filter: "/?"
2014/07/11 12:42:50 [debug] 222#0: *1 http subs filter "/"
2014/07/11 12:42:50 [debug] 222#0: *1 subs in buffer:00007FD3D8819168, size:120, flush:0, last_buf:0
2014/07/11 12:42:50 [debug] 222#0: *1 subs in buffer:00007FD3D88191B8, size:52, flush:0, last_buf:1
2014/07/11 12:42:50 [debug] 222#0: *1 subs process in buffer: 00007FD3D8819168 120, line_in buffer: 00007FD3D8818F98 0
2014/07/11 12:42:50 [debug] 222#0: *1 find linefeed: 000000010AE19457
2014/07/11 12:42:50 [debug] 222#0: *1 malloc: 00007FD3D8829800:4096
2014/07/11 12:42:50 [debug] 222#0: *1 match counts: 0
2014/07/11 12:42:50 [debug] 222#0: *1 find linefeed: 000000010AE19484
2014/07/11 12:42:50 [debug] 222#0: *1 match counts: 0
2014/07/11 12:42:50 [debug] 222#0: *1 find linefeed: 000000010AE1949C
2014/07/11 12:42:50 [debug] 222#0: *1 match counts: 0
2014/07/11 12:42:50 [debug] 222#0: *1 find linefeed: 000000010AE194C7
2014/07/11 12:42:50 [debug] 222#0: *1 match counts: 0
2014/07/11 12:42:50 [debug] 222#0: *1 subs process in buffer: 00007FD3D88191B8 52, line_in buffer: 00007FD3D8818F98 0
2014/07/11 12:42:50 [debug] 222#0: *1 find linefeed: 000000010AE18341
2014/07/11 12:42:50 [debug] 222#0: *1 match counts: 0
2014/07/11 12:42:50 [debug] 222#0: *1 find linefeed: 000000010AE1834A
2014/07/11 12:42:50 [debug] 222#0: *1 match counts: 0
2014/07/11 12:42:50 [debug] 222#0: *1 find linefeed: 000000010AE18353
2014/07/11 12:42:50 [debug] 222#0: *1 match counts: 0
2014/07/11 12:42:50 [debug] 222#0: *1 subs out buffer:00007FD3D8819338, size:172, t:1, l:1
2014/07/11 12:42:50 [debug] 222#0: *1 http postpone filter "/?" 00007FD3D8819328
2014/07/11 12:42:50 [debug] 222#0: *1 http chunk: 172
2014/07/11 12:42:50 [debug] 222#0: *1 write old buf t:1 f:0 00007FD3D88190B8, pos 00007FD3D88190B8, size: 158 file: 0, size: 0
2014/07/11 12:42:50 [debug] 222#0: *1 write new buf t:1 f:0 00007FD3D8819408, pos 00007FD3D8819408, size: 4 file: 0, size: 0
2014/07/11 12:42:50 [debug] 222#0: *1 write new buf t:1 f:0 00007FD3D8829800, pos 00007FD3D8829800, size: 172 file: 0, size: 0
2014/07/11 12:42:50 [debug] 222#0: *1 write new buf t:0 f:0 0000000000000000, pos 000000010AE09278, size: 7 file: 0, size: 0
2014/07/11 12:42:50 [debug] 222#0: *1 http write filter: l:1 f:1 s:341
2014/07/11 12:42:50 [debug] 222#0: *1 http write filter limit 0
2014/07/11 12:42:50 [debug] 222#0: *1 writev: 341 of 341
2014/07/11 12:42:50 [debug] 222#0: *1 http write filter 0000000000000000
2014/07/11 12:42:50 [debug] 222#0: *1 subs out end: 00007FD3D8819338 0
2014/07/11 12:42:50 [debug] 222#0: *1 http copy filter: -2 "/?"
2014/07/11 12:42:50 [debug] 222#0: *1 http finalize request: -2, "/?" a:1, c:1
2014/07/11 12:42:50 [debug] 222#0: *1 http request count:1 blk:0
2014/07/11 12:42:50 [debug] 222#0: *1 http close request
2014/07/11 12:42:50 [debug] 222#0: *1 http log handler
2014/07/11 12:42:50 [debug] 222#0: *1 free: 00007FD3D8829800
2014/07/11 12:42:50 [debug] 222#0: *1 free: 00007FD3D8821800
2014/07/11 12:42:50 [debug] 222#0: *1 free: 00007FD3D8819800
2014/07/11 12:42:50 [debug] 222#0: *1 free: 00007FD3D8817800, unused: 8
2014/07/11 12:42:50 [debug] 222#0: *1 free: 00007FD3D8818800, unused: 723
2014/07/11 12:42:50 [debug] 222#0: *1 close http connection: 8
2014/07/11 12:42:50 [debug] 222#0: *1 reusable connection: 0
2014/07/11 12:42:50 [debug] 222#0: *1 free: 00007FD3D8817400
2014/07/11 12:42:50 [debug] 222#0: *1 free: 00007FD3D8600170, unused: 0
2014/07/11 12:42:50 [debug] 222#0: *1 free: 00007FD3D8600270, unused: 120
2014/07/11 12:42:50 [debug] 222#0: kevent: 9: ft:-2 fl:8025 ff:0000003D d:131072 ud:00007FD3D88158E0
2014/07/11 12:42:50 [debug] 222#0: kevent: stale event 00007FD3D88158E0
2014/07/11 12:42:50 [debug] 222#0: timer delta: 0
2014/07/11 12:42:50 [debug] 222#0: posted events 0000000000000000
2014/07/11 12:42:50 [debug] 222#0: worker cycle
2014/07/11 12:42:50 [debug] 222#0: kevent timer: -1, changes: 0
2014/07/11 12:42:50 [notice] 222#0: signal 3 (SIGQUIT) received, shutting down
2014/07/11 12:42:50 [debug] 222#0: kevent events: -1
2014/07/11 12:42:50 [info] 222#0: kevent() failed (4: Interrupted system call)
2014/07/11 12:42:50 [debug] 222#0: timer delta: 21
2014/07/11 12:42:50 [debug] 222#0: posted events 0000000000000000
2014/07/11 12:42:50 [debug] 222#0: flush files
2014/07/11 12:42:50 [notice] 222#0: exit
2014/07/11 12:42:50 [debug] 222#0: close listening 0.0.0.0:1984 #7
2014/07/11 12:42:50 [debug] 222#0: run cleanup: 00007FD3D9021BB8
2014/07/11 12:42:50 [debug] 222#0: perl term
2014/07/11 12:42:50 [debug] 222#0: run cleanup: 00007FD3D901FC40
2014/07/11 12:42:50 [debug] 222#0: cleanup resolver
2014/07/11 12:42:50 [debug] 222#0: run cleanup: 00007FD3D9006F30
2014/07/11 12:42:50 [debug] 222#0: free: 00007FD3D90ED600
2014/07/11 12:42:50 [debug] 222#0: free: 00007FD3D9017800
2014/07/11 12:42:50 [debug] 222#0: free: 00007FD3D9012600
2014/07/11 12:42:50 [debug] 222#0: free: 00007FD3D9011400
2014/07/11 12:42:50 [debug] 222#0: free: 00007FD3D9010200
2014/07/11 12:42:50 [debug] 222#0: free: 00007FD3D9004C00, unused: 0
2014/07/11 12:42:50 [debug] 222#0: free: 00007FD3D9013800, unused: 0
2014/07/11 12:42:50 [debug] 222#0: free: 00007FD3D9018800, unused: 0
2014/07/11 12:42:50 [debug] 222#0: free: 00007FD3D901F400, unused: 0
2014/07/11 12:42:50 [debug] 222#0: free: 00007FD3D90BF800, unused: 11132
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment