Welcome! Log In Create A New Profile

Advanced

Nginx redis, select database not working?

June 04, 2011 08:40AM
I'm having problem with redis module: http://wiki.nginx.org/HttpRedis (version 0.32 downloaded from mirror at https://github.com/elcuervo/nginx_http_redis)

As I tried, variable $redis_db is never used and result always comes from "default" - database 0.
Am I missing something in my config?

my nginx.conf (part of):
upstream { server 192.168.2.178:6379; keepalive 256 single;}

location /testredisselect0
{
default_type text/html;
set $redis_key "$uri?dbid=notdef";
redis_pass redisbackend;
}

location /testredisselect1
{
default_type text/html;
set $redis_db "1";
set $redis_key "$uri?dbid=1";
redis_pass redisbackend;
}


curl "http://localhost/testredisselect0"
curl "http://localhost/testredisselect1"

result in redis monitor:
1307190385.099634 "select" "0"
1307190385.099688 "get" "/testredisselect0?dbid=notdef"
1307190387.739512 "select" "0"
1307190387.739561 "get" "/testredisselect1?dbid=1"

As I can see, command always issues select 0, although it should run select 1 in second case.

Damir
Subject Author Posted

Nginx redis, select database not working?

logar.damir June 04, 2011 08:40AM

Re: Nginx redis, select database not working?

gregr401 June 07, 2011 02:45PM

Re: Nginx redis, select database not working?

Sergey A. Osokin June 07, 2011 02:52PM

Re: Nginx redis, select database not working?

logar.damir June 07, 2011 09:50PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 80
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