redis2-nginx-module
redis2-nginx-module copied to clipboard
does `redis2_raw_queries` support transaction or has bug ?
my nginx version is 1.8.1 and redis version is 2.8.1, when I used command redis2_raw_queries
, like this:
redis2_raw_queries 4 "multi\r\nhmset $msec:header host $host remote_addr $remote_addr remote_port $remote_port request_uri $request_uri status $status\r\nsadd member:header $msec:$request_uri\r\nexec\r\n";
Finally, I got different numbers of hash key and set collection members , but there is no errors in error.log . Always, set collection has more members than has keys in redis .
however, when I use double redis2_query
command to execute hmset
and sadd
, the result is OK .
@toints I tried your example on my side and I got the following output with curl:
+OK
+QUEUED
+QUEUED
*2
+OK
:1
It's not what you'd expect? If not, then what do you expect?
@toints The redis server receives the following raw redis query from nginx:
multi
hmset 1463091589.721:header host localhost remote_addr 127.0.0.1 remote_port 55790 request_uri /redis_get status 000
sadd member:header 1463091589.721:/redis_get
exec
Looks good to me.
@agentzh Thank you , your result is what I want. But I got the problem when I doing stress testing. And I used nginx as forward proxy server to receive all requests from my chrome browser, I also got the problem.
@toints Please provide a minimal and standalone example and exact steps that I can take to reproduce the "stress testing problem" on my side.