[SR-Users] Redis module problem

Daniel-Constantin Mierla miconda at gmail.com
Thu Mar 21 07:58:57 CET 2013


Hello,

iirc, the error is signaled as part of redis response pseudo-variable 
(as type field or so). But indeed can be more logical as you present.

It is kind of typical behavior not to start when not able to connect to 
backend (e.g., even for like mysql, etc.). This could be changed, as 
there are options to reconnect at runtime, just that nobody took the 
time to do it...

If you make a patch for any or both of these change, we will get the in 
-- if you are not a developer and is not convenient to do it, I will do 
it sometime soon, in this devel cycle, but I may need your assistance to 
test.

Cheers,
Daniel

On 3/20/13 5:54 PM, pars3c wrote:
>
> Hello,
>
> i'm using the Redis module, but the function "redis_cmd" doesn't 
> return false if there is some problem on the database.
>
> if(redis_cmd("srv1","$var(redis_credit)", "r")) {
>
> $var(credit_op)=$redis(r=>value);
>
> xlog("L_INFO","xxxxxxx -- \n");
>
> } else { xlog("L_INFO","yyyyyyyy -- \n");}
>
> If I stop the redis db, and make a call , it enter in the "if" 
> statement and write the log xxx .  I think that , if the db is down, 
> it should enter in the "else" and write the yyyy log.
>
> Where is the error ?
>
> Why , if the db is down, and I try to restart kamailio, it don't start ?
>
> It write in the log , that the connection is broken and it remain stopped.
>
> Thanks
>
>
>
> _______________________________________________
> SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
> sr-users at lists.sip-router.org
> http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
Kamailio World Conference, April 16-17, 2013, Berlin
  - http://conference.kamailio.com -

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130321/efe6a3c8/attachment.htm>


More information about the sr-users mailing list