Hi Ricardo,
you use ping_interval 10 seconds. For 126 gateways it's extrem short . Can you set this param up to 60 seconds and check again ?
Wbr, Alexandr
P.S. will be nice to see the result from "ngrep -W byline -t -l port 5060", if it possible :-)
-----Original Message----- From: users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] On Behalf Of Ricardo Martinez Sent: Thursday, October 15, 2009 4:48 PM To: users@lists.kamailio.org Subject: [Kamailio-Users] Problem with LCR "ping"
Hello list.
I have a question/problem regarding the LCR module. I'm using Kamailio version 1.5.2. The LCR tables have :
gw table : 126 records
lrc tables : 120 records.
I'm using the "ping" (ping = 1) feature in all my gateways, part of the cfg file is as follows :
modparam("lcr","db_url","mysql://openserro:openserro@localhost/openser")
modparam("tm", "fr_inv_timer_avp", "$avp(i:704)")
modparam("lcr", "gw_uri_avp", "$avp(i:709)")
modparam("^auth$|lcr", "rpid_avp", "$avp(i:302)")
modparam("lcr", "ruri_user_avp", "$avp(i:500)")
modparam("lcr", "flags_avp", "$avp(i:712)")
modparam("lcr", "fetch_rows", 3000)
modparam("lcr", "ping_interval", 10)
modparam("lcr", "ping_from", "sip:pinger@mydomain.net")
modparam("lcr", "ping_method", "OPTIONS")
From time to time I can see 3 o 4 gateways marked as down (with the command kamctl lcr dump). I'm not manually monitoring the gateways every minute so is possible that in a particular moment the gateways could be unreachable, but when I run the command "kamctl lcr dump" the gateways are on-line, that's for sure.
So I'm not understanding why LCR keep marking the gateways as down, even if they are answering to the OPTIONS request. Could this be a bug in the LCR module? Or maybe I'm missing something?. The silly part of all this is the gateways marked as down are always the same. Could this be related to a memory issue??
Can someone guide me here?.
Thanks in advance,
Regards,
Ricardo Martinez.-
El Lunes, 19 de Octubre de 2009, Alexandr Dubovikov escribió:
Hi Ricardo,
you use ping_interval 10 seconds. For 126 gateways it's extrem short . Can you set this param up to 60 seconds and check again ?
Hi, note that lcr "ping_interval" parameter has a minimun value hacked in the code (not sure if it's 300 or 600 seconds), so even if you set:
modparam("lcr", "ping_interval", 10)
the real used value is 300/600.
Iñaki Baz Castillo пишет:
El Lunes, 19 de Octubre de 2009, Alexandr Dubovikov escribió:
Hi Inaki,
Hi Ricardo,
you use ping_interval 10 seconds. For 126 gateways it's extrem short . Can you set this param up to 60 seconds and check again ?
Hi, note that lcr "ping_interval" parameter has a minimun value hacked in the code (not sure if it's 300 or 600 seconds), so even if you set:
modparam("lcr", "ping_interval", 10)
the real used value is 300/600.
I just want to know if it so. Ricard could change the time interval really to 10 seconds. (DEF_PING_TIMER)
Wbr, Alexandr
On Montag, 19. Oktober 2009, Iñaki Baz Castillo wrote:
you use ping_interval 10 seconds. For 126 gateways it's extrem short . Can you set this param up to 60 seconds and check again ?
Hi, note that lcr "ping_interval" parameter has a minimun value hacked in the code (not sure if it's 300 or 600 seconds), so even if you set:
modparam("lcr", "ping_interval", 10)
the real used value is 300/600.
Hi Inaki,
according the module docs the minimum value is 180 seconds, and this is also the value in the source code, i think. Do you refer to another parameter?
Regards,
Henning
El Martes, 20 de Octubre de 2009, Henning Westerholt escribió:
On Montag, 19. Oktober 2009, Iñaki Baz Castillo wrote:
you use ping_interval 10 seconds. For 126 gateways it's extrem short . Can you set this param up to 60 seconds and check again ?
Hi, note that lcr "ping_interval" parameter has a minimun value hacked in the code (not sure if it's 300 or 600 seconds), so even if you set:
modparam("lcr", "ping_interval", 10)
the real used value is 300/600.
Hi Inaki,
according the module docs the minimum value is 180 seconds, and this is also the value in the source code, i think. Do you refer to another parameter?
No, but I didn't remember the exact value so I said 300-600 :) Thanks.
Hello List. Sorry for the delay, i was busy in something else. Regarding to the ping_interval parameter, the proxy is checking the gateways every 180 seconds, despite the configuration file is set to "10" seconds, that's no problem and is according the README file. For the moment I have removed the "ping" check feature for the gateways with problems. Could this be related with the parameter "lcr_hash_size", the default value is 128, maybe I need to make it larger? I will be doing more tests and I will let you know the results.
Thanks, Ricardo.-
-----Mensaje original----- De: users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] En nombre de Iñaki Baz Castillo Enviado el: martes, 20 de octubre de 2009 6:45 Para: users@lists.kamailio.org Asunto: Re: [Kamailio-Users] Problem with LCR "ping"
El Martes, 20 de Octubre de 2009, Henning Westerholt escribió:
On Montag, 19. Oktober 2009, Iñaki Baz Castillo wrote:
you use ping_interval 10 seconds. For 126 gateways it's extrem short . Can you set this param up to 60 seconds and check again ?
Hi, note that lcr "ping_interval" parameter has a minimun value hacked in the code (not sure if it's 300 or 600 seconds), so even if you set:
modparam("lcr", "ping_interval", 10)
the real used value is 300/600.
Hi Inaki,
according the module docs the minimum value is 180 seconds, and this is also the value in the source code, i think. Do you refer to another parameter?
No, but I didn't remember the exact value so I said 300-600 :) Thanks.
Ricardo Martinez writes:
Could this be related with the parameter "lcr_hash_size", the default value is 128, maybe I need to make it larger?
as the name says, lcr_hash_size affects the size of the hash table. any power 2 size is ok. larger size just means smaller likelihood for collisions.
-- juha
Ricardo Martinez wrote:
Hello List. Sorry for the delay, i was busy in something else. Regarding to the ping_interval parameter, the proxy is checking the gateways every 180 seconds, despite the configuration file is set to "10" seconds, that's no problem and is according the README file. For the moment I have removed the "ping" check feature for the gateways with problems. Could this be related with the parameter "lcr_hash_size", the default value is 128, maybe I need to make it larger? I will be doing more tests and I will let you know the results.
Did all yours gateways answer with one of "positive_codes" on OPTIONS requests ? The default codes are "200;501;403;404". Of course you can redinfine it: modparam("lcr", "positive_codes", "200;202;404")
Thanks, Ricardo.-
Wbr, Alexandr
-----Mensaje original----- De: users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] En nombre de Iñaki Baz Castillo Enviado el: martes, 20 de octubre de 2009 6:45 Para: users@lists.kamailio.org Asunto: Re: [Kamailio-Users] Problem with LCR "ping"
El Martes, 20 de Octubre de 2009, Henning Westerholt escribió:
On Montag, 19. Oktober 2009, Iñaki Baz Castillo wrote:
you use ping_interval 10 seconds. For 126 gateways it's extrem short . Can you set this param up to 60 seconds and check again ?
Hi, note that lcr "ping_interval" parameter has a minimun value hacked in the code (not sure if it's 300 or 600 seconds), so even if you set:
modparam("lcr", "ping_interval", 10)
the real used value is 300/600.
Hi Inaki,
according the module docs the minimum value is 180 seconds, and this is also the value in the source code, i think. Do you refer to another parameter?
No, but I didn't remember the exact value so I said 300-600 :) Thanks.
Hello Alexandr. I will check this too. I will keep you updated.
Regards, Ricardo.-
-----Mensaje original----- De: Alexandr Dubovikov [mailto:voip@start4.info] Enviado el: martes, 20 de octubre de 2009 16:36 Para: Ricardo Martinez CC: users@lists.kamailio.org Asunto: Re: [Kamailio-Users] Problem with LCR "ping"
Ricardo Martinez wrote:
Hello List. Sorry for the delay, i was busy in something else. Regarding to the ping_interval parameter, the proxy is checking the gateways every 180 seconds, despite the configuration file is set to "10" seconds, that's no problem and is according the README file. For the moment I have removed the "ping" check feature for the gateways with problems. Could this be related with the parameter "lcr_hash_size", the default value is 128, maybe I need to make it larger? I will be doing more tests and I will let you know the results.
Did all yours gateways answer with one of "positive_codes" on OPTIONS requests ? The default codes are "200;501;403;404". Of course you can redinfine it: modparam("lcr", "positive_codes", "200;202;404")
Thanks, Ricardo.-
Wbr, Alexandr
-----Mensaje original----- De: users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] En nombre de Iñaki Baz Castillo Enviado el: martes, 20 de octubre de 2009 6:45 Para: users@lists.kamailio.org Asunto: Re: [Kamailio-Users] Problem with LCR "ping"
El Martes, 20 de Octubre de 2009, Henning Westerholt escribió:
On Montag, 19. Oktober 2009, Iñaki Baz Castillo wrote:
you use ping_interval 10 seconds. For 126 gateways it's extrem short . Can you set this param up to 60 seconds and check again ?
Hi, note that lcr "ping_interval" parameter has a minimun value hacked in the code (not sure if it's 300 or 600 seconds), so even if you set:
modparam("lcr", "ping_interval", 10)
the real used value is 300/600.
Hi Inaki,
according the module docs the minimum value is 180 seconds, and this is also the value in the source code, i think. Do you refer to another parameter?
No, but I didn't remember the exact value so I said 300-600 :) Thanks.