Welcome! Log In Create A New Profile

Advanced

Re: nginx proxy vs memcached data

September 23, 2013 08:38AM
Спасибо. По задумке то что надо. Пробую на стабильной версии 1.4.2:

location / {
eval $var {
set $memcached_key "$request_uri";
memcached_pass localhost:11211;
}
proxy_pass $var;
}

Получаю в логах:

2013/09/23 16:24:49 [debug] 24218#0: *1 test location: "/"
2013/09/23 16:24:49 [debug] 24218#0: *1 test location: "eval_7274000"
2013/09/23 16:24:49 [debug] 24218#0: *1 using configuration "/"

Вторая строчка это subrequest для перехода по значению memcached, однако дальше

2013/09/23 16:31:08 [debug] 24622#0: *1 http cl:-1 max:1048576
2013/09/23 16:31:08 [debug] 24622#0: *1 rewrite phase: 3
2013/09/23 16:31:08 [debug] 24622#0: *1 http subrequest "/eval_7274000?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http finalize request: -2, "/aaa.php?" a:0, c:2
2013/09/23 16:31:08 [debug] 24622#0: *1 event timer add: 20: 60000:1379939528820
2013/09/23 16:31:08 [debug] 24622#0: *1 http posted request: "/eval_7274000?"
2013/09/23 16:31:08 [debug] 24622#0: *1 rewrite phase: 1
2013/09/23 16:31:08 [debug] 24622#0: *1 test location: "/"
2013/09/23 16:31:08 [debug] 24622#0: *1 test location: "eval_7274000"
2013/09/23 16:31:08 [debug] 24622#0: *1 using configuration "=/eval_7274000"
2013/09/23 16:31:08 [debug] 24622#0: *1 http cl:-1 max:1048576
2013/09/23 16:31:08 [debug] 24622#0: *1 rewrite phase: 3
2013/09/23 16:31:08 [debug] 24622#0: *1 rewrite phase: 4
2013/09/23 16:31:08 [debug] 24622#0: *1 http script complex value
2013/09/23 16:31:08 [debug] 24622#0: *1 http script var: "/aaa.php"
2013/09/23 16:31:08 [debug] 24622#0: *1 http script set $memcached_key
2013/09/23 16:31:08 [debug] 24622#0: *1 post rewrite phase: 5
2013/09/23 16:31:08 [debug] 24622#0: *1 generic phase: 6
2013/09/23 16:31:08 [debug] 24622#0: *1 generic phase: 7
2013/09/23 16:31:08 [debug] 24622#0: *1 generic phase: 8
2013/09/23 16:31:08 [debug] 24622#0: *1 posix_memalign: 00000000006E11C0:4096 @16
2013/09/23 16:31:08 [debug] 24622#0: *1 http init upstream, client timer: 0
2013/09/23 16:31:08 [debug] 24622#0: *1 epoll add event: fd:20 op:3 ev:80000005
2013/09/23 16:31:08 [debug] 24622#0: *1 http memcached request: "/aaa.php"
2013/09/23 16:31:08 [debug] 24622#0: *1 http cleanup add: 0000000000720A30
2013/09/23 16:31:08 [debug] 24622#0: *1 get rr peer, try: 1
2013/09/23 16:31:08 [debug] 24622#0: *1 socket 21
2013/09/23 16:31:08 [debug] 24622#0: *1 epoll add connection: fd:21 ev:80000005
2013/09/23 16:31:08 [debug] 24622#0: *1 connect to 127.0.0.1:11211, fd:21 #2
2013/09/23 16:31:08 [debug] 24622#0: *1 http upstream connect: -2
2013/09/23 16:31:08 [debug] 24622#0: *1 posix_memalign: 000000000073EA50:128 @16
2013/09/23 16:31:08 [debug] 24622#0: *1 event timer add: 21: 60000:1379939528820
2013/09/23 16:31:08 [debug] 24622#0: *1 http finalize request: -4, "/eval_7274000?" a:1, c:3
2013/09/23 16:31:08 [debug] 24622#0: *1 event timer add: 20: 5000:1379939473820
2013/09/23 16:31:08 [debug] 24622#0: *1 http request count:3 blk:0
2013/09/23 16:31:08 [debug] 24622#0: *1 post event 00000000007AB938
2013/09/23 16:31:08 [debug] 24622#0: *1 post event 00000000007AB9A0
2013/09/23 16:31:08 [debug] 24622#0: *1 delete posted event 00000000007AB9A0
2013/09/23 16:31:08 [debug] 24622#0: *1 http upstream request: "/eval_7274000?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http upstream send request handler
2013/09/23 16:31:08 [debug] 24622#0: *1 http upstream send request
2013/09/23 16:31:08 [debug] 24622#0: *1 chain writer buf fl:0 s:14
2013/09/23 16:31:08 [debug] 24622#0: *1 chain writer in: 0000000000720A68
2013/09/23 16:31:08 [debug] 24622#0: *1 writev: 14
2013/09/23 16:31:08 [debug] 24622#0: *1 chain writer out: 0000000000000000
2013/09/23 16:31:08 [debug] 24622#0: *1 event timer del: 21: 1379939528820
2013/09/23 16:31:08 [debug] 24622#0: *1 event timer add: 21: 60000:1379939528821
2013/09/23 16:31:08 [debug] 24622#0: *1 delete posted event 00000000007AB938
2013/09/23 16:31:08 [debug] 24622#0: *1 http run request: "/eval_7274000?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http upstream check client, write event:1, "/eval_7274000"
2013/09/23 16:31:08 [debug] 24622#0: *1 http upstream recv(): -1 (11: Resource temporarily unavailable)
2013/09/23 16:31:08 [debug] 24622#0: *1 post event 0000000000791990
2013/09/23 16:31:08 [debug] 24622#0: *1 post event 00000000007AB9A0
2013/09/23 16:31:08 [debug] 24622#0: *1 delete posted event 00000000007AB9A0
2013/09/23 16:31:08 [debug] 24622#0: *1 http upstream request: "/eval_7274000?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http upstream dummy handler
2013/09/23 16:31:08 [debug] 24622#0: *1 delete posted event 0000000000791990
2013/09/23 16:31:08 [debug] 24622#0: *1 http upstream request: "/eval_7274000?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http upstream process header
2013/09/23 16:31:08 [debug] 24622#0: *1 malloc: 00000000006D9220:4096
2013/09/23 16:31:08 [debug] 24622#0: *1 recv: fd:21 52 of 4096
2013/09/23 16:31:08 [debug] 24622#0: *1 memcached: "VALUE /aaa.php 0 24"
2013/09/23 16:31:08 [debug] 24622#0: *1 memcached filter bytes:31 size:31 length:31 rest:7
2013/09/23 16:31:08 [debug] 24622#0: *1 finalize http upstream request: 0
2013/09/23 16:31:08 [debug] 24622#0: *1 finalize http memcached request
2013/09/23 16:31:08 [debug] 24622#0: *1 free rr peer 1 0
2013/09/23 16:31:08 [debug] 24622#0: *1 close http upstream connection: 21
2013/09/23 16:31:08 [debug] 24622#0: *1 free: 000000000073EA50, unused: 48
2013/09/23 16:31:08 [debug] 24622#0: *1 event timer del: 21: 1379939528821
2013/09/23 16:31:08 [debug] 24622#0: *1 reusable connection: 0
2013/09/23 16:31:08 [debug] 24622#0: *1 http output filter "/eval_7274000?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http copy filter: "/eval_7274000?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http postpone filter "/eval_7274000?" 00007FFFC4CFE300
2013/09/23 16:31:08 [debug] 24622#0: *1 write new buf t:0 f:0 0000000000000000, pos 0000000000000000, size: 0 file: 0, size: 0
2013/09/23 16:31:08 [debug] 24622#0: *1 http write filter: l:0 f:0 s:0
2013/09/23 16:31:08 [debug] 24622#0: *1 http copy filter: 0 "/eval_7274000?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http finalize request: 0, "/eval_7274000?" a:1, c:2
2013/09/23 16:31:08 [debug] 24622#0: *1 http wake parent request: "/aaa.php?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http posted request: "/aaa.php?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http writer handler: "/aaa.php?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http output filter "/aaa.php?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http copy filter: "/aaa.php?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http postpone filter "/aaa.php?" 0000000000000000
2013/09/23 16:31:08 [debug] 24622#0: *1 http copy filter: 0 "/aaa.php?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http writer output filter: 0, "/aaa.php?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http writer done: "/aaa.php?"
2013/09/23 16:31:08 [debug] 24622#0: *1 http finalize request: 0, "/aaa.php?" a:1, c:1
2013/09/23 16:31:08 [debug] 24622#0: *1 event timer del: 20: 1379939473820
2013/09/23 16:31:08 [debug] 24622#0: *1 event timer del: 20: 1379939528820
2013/09/23 16:31:08 [debug] 24622#0: *1 set http keepalive handler
2013/09/23 16:31:08 [debug] 24622#0: *1 http close request
2013/09/23 16:31:08 [debug] 24622#0: *1 http log handler
2013/09/23 16:31:08 [debug] 24622#0: *1 free: 00000000006D9220
2013/09/23 16:31:08 [debug] 24622#0: *1 free: 0000000000785530, unused: 2
2013/09/23 16:31:08 [debug] 24622#0: *1 free: 000000000071FCF0, unused: 24
2013/09/23 16:31:08 [debug] 24622#0: *1 free: 00000000006E11C0, unused: 2700
2013/09/23 16:31:08 [debug] 24622#0: *1 free: 00000000006D4660
2013/09/23 16:31:08 [debug] 24622#0: *1 hc free: 0000000000000000 0
2013/09/23 16:31:08 [debug] 24622#0: *1 hc busy: 0000000000000000 0
2013/09/23 16:31:08 [debug] 24622#0: *1 tcp_nodelay
2013/09/23 16:31:08 [debug] 24622#0: *1 reusable connection: 1
2013/09/23 16:31:08 [debug] 24622#0: *1 event timer add: 20: 15000:1379939483821
2013/09/23 16:31:08 [debug] 24622#0: *1 post event 0000000000791928
2013/09/23 16:31:08 [debug] 24622#0: *1 delete posted event 0000000000791928
2013/09/23 16:31:08 [debug] 24622#0: *1 http keepalive handler
2013/09/23 16:31:08 [debug] 24622#0: *1 malloc: 00000000006D4660:1024
2013/09/23 16:31:08 [debug] 24622#0: *1 recv: fd:20 -1 of 1024
2013/09/23 16:31:08 [debug] 24622#0: *1 recv() not ready (11: Resource temporarily unavailable)
2013/09/23 16:31:08 [debug] 24622#0: *1 free: 00000000006D4660
2013/09/23 16:31:23 [debug] 24622#0: *1 event timer del: 20: 1379939483821
2013/09/23 16:31:23 [debug] 24622#0: *1 http keepalive handler
2013/09/23 16:31:23 [debug] 24622#0: *1 close http connection: 20
2013/09/23 16:31:23 [debug] 24622#0: *1 reusable connection: 0
2013/09/23 16:31:23 [debug] 24622#0: *1 free: 0000000000000000
2013/09/23 16:31:23 [debug] 24622#0: *1 free: 00000000007047A0, unused: 8
2013/09/23 16:31:23 [debug] 24622#0: *1 free: 0000000000728D70, unused: 144

Resource temporarily unavailable

И всё
Subject Author Posted

nginx proxy vs memcached data

aaaa5 September 22, 2013 11:27AM

Re: nginx proxy vs memcached data

Alex Vorona September 23, 2013 05:04AM

Re: nginx proxy vs memcached data

aaaa5 September 23, 2013 08:38AM

Re: nginx proxy vs memcached data

aaaa5 September 23, 2013 09:10AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 122
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready