Re: [SR-Users] ndb_redis module fails after a while

2012-01-13 Thread Andrew Pogrebennyk
Javi, ndb_redis does not reconnect if the server closes connection on timeout. It should work if you set timeout to zero in server config. I thought that I created a ticket in the bugtracker for that before, but not sure, I can't find it right now. On 13.01.2012 08:00, Javier Gallart wrote:

Re: [SR-Users] ndb_redis module fails after a while

2012-01-13 Thread Daniel-Constantin Mierla
Hello, On 1/13/12 8:00 AM, Javier Gallart wrote: Hi all I have started making some tests with the ndb_redis module. So far we have not stressed the module (no more than 5 HGET commands/second at maximum). It works well, but with at some point it starts failing. The failures are easily found

Re: [SR-Users] ndb_redis module fails after a while

2012-01-13 Thread Javier Gallart
Hi Daniel both values are null. I might have found something: apparently some of the sockets kamailio->redis were inactive for a while and were being closed in the redis end. This is redis default config: # Close the connection after a client is idle for N seconds (0 to disable) timeout 600 I've

Re: [SR-Users] ndb_redis module fails after a while

2012-01-16 Thread Daniel-Constantin Mierla
Hello, On 1/13/12 12:27 PM, Javier Gallart wrote: Hi Daniel both values are null. ok, could be a hint that the connection is down and try a reconnect... I might have found something: apparently some of the sockets kamailio->redis were inactive for a while and were being closed in the redis

Re: [SR-Users] ndb_redis module fails after a while

2012-01-16 Thread Javier Gallart
Hi Daniel On Mon, Jan 16, 2012 at 9:47 AM, Daniel-Constantin Mierla wrote: > Hello, > > > On 1/13/12 12:27 PM, Javier Gallart wrote: > > Hi Daniel > > both values are null. > > ok, could be a hint that the connection is down and try a reconnect... > > > I might have found something: apparentl

Re: [SR-Users] ndb_redis module fails after a while

2012-02-17 Thread Daniel-Constantin Mierla
Hello, I made a patch for server reconnect -- I had no access to a computer with redis lib installed for the moment, hopefully it compiles. If you can try and tell the result, it would be great, I can commit then. Cheers, Daniel On 1/16/12 12:15 PM, Javier Gallart wrote: Hi Daniel On Mon,

Re: [SR-Users] ndb_redis module fails after a while

2012-02-17 Thread Andrew Pogrebennyk
Hi Daniel, On 02/17/2012 10:47 AM, Daniel-Constantin Mierla wrote: > I made a patch for server reconnect -- I had no access to a computer > with redis lib installed for the moment, hopefully it compiles. If you > can try and tell the result, it would be great, I can commit then. I may be able to

Re: [SR-Users] ndb_redis module fails after a while

2012-02-17 Thread Daniel-Constantin Mierla
Hello, thanks for testing, indeed it was an extra declaration left over. Can you try with the new patch attached? Cheers, Daniel On 2/17/12 11:10 AM, Andrew Pogrebennyk wrote: Hi Daniel, On 02/17/2012 10:47 AM, Daniel-Constantin Mierla wrote: I made a patch for server reconnect -- I had no

Re: [SR-Users] ndb_redis module fails after a while

2012-02-17 Thread Javier Gallart
Hi Daniel, Andrew I've just tested the patch and kamailio crashes when the redis server is stopped. This is what I could get: -From the logs: Feb 17 06:33:32 r-gate-test ./kamailio[23812]: ALERT: [main.c:751]: child process 23819 exited by a signal 11 Feb 17 06:33:32 r-gate-test ./kamailio[23812]

Re: [SR-Users] ndb_redis module fails after a while

2012-02-17 Thread Daniel-Constantin Mierla
Hello, right, very dummy paste position for resetting the redis context, use the attached patch or exchange lines 228 and 229. in redis_client.c Thanks, Daniel On 2/17/12 1:13 PM, Javier Gallart wrote: Hi Daniel, Andrew I've just tested the patch and kamailio crashes when the redis server

Re: [SR-Users] ndb_redis module fails after a while

2012-02-17 Thread Javier Gallart
Thanks Daniel On Fri, Feb 17, 2012 at 2:30 PM, Daniel-Constantin Mierla wrote: > Hello, > > right, very dummy paste position for resetting the redis context, use the > attached patch or exchange lines 228 and 229. in redis_client.c > It works perfectly well now.: ERROR: ndb_redis [redis_client

Re: [SR-Users] ndb_redis module fails after a while

2012-02-17 Thread Daniel-Constantin Mierla
Hello, thanks for testing and feedback. Latest patch was just committed on master branch. Cheers, Daniel On 2/17/12 3:08 PM, Javier Gallart wrote: Thanks Daniel On Fri, Feb 17, 2012 at 2:30 PM, Daniel-Constantin Mierla mailto:mico...@gmail.com>> wrote: Hello, right, very dummy p