I am working to get LCR implemented on my migration system, and when I try to start kamailio i find the below information in the log file, and kamailio fails to start. My lcr table has 30667 rows in it. I have read about changing the config.h file to increase the private memory, but my question is how much should I allocate. I forsee going up to more than 200,000 routes within the next 12 month period. I am currently working towards migrating up from openser 1.3.3 to kamailio-1.4.4-notls. I am currently not using LCR in my production openser 1.3.3 system. This is new functionality that we are implementing as part of the upgrade.
Apr 29 17:13:49 n01-sip-c61-56-atl /sbin/kamailio[5372]: ERROR:db_mysql:db_mysql_convert_row: no private memory left Apr 29 17:13:49 n01-sip-c61-56-atl /sbin/kamailio[5372]: ERROR:db_mysql:db_mysql_convert_rows: error while converting row #2808 Apr 29 17:13:49 n01-sip-c61-56-atl /sbin/kamailio[5372]: ERROR:db_mysql:db_mysql_convert_result: error while converting rows Apr 29 17:13:49 n01-sip-c61-56-atl /sbin/kamailio[5372]: ERROR:db_mysql:db_mysql_store_result: error while converting result Apr 29 17:13:49 n01-sip-c61-56-atl /sbin/kamailio[5372]: ERROR:core:db_do_query: error while storing result Apr 29 17:13:49 n01-sip-c61-56-atl /sbin/kamailio[5372]: ERROR:lcr:reload_gws: Failed to query lcr data Apr 29 17:13:49 n01-sip-c61-56-atl /sbin/kamailio[5372]: CRITICAL:lcr:mod_init: Failed to reload gateways and routes Apr 29 17:13:49 n01-sip-c61-56-atl /sbin/kamailio[5372]: ERROR:core:init_mod: failed to initialize module lcr Apr 29 17:13:49 n01-sip-c61-56-atl /sbin/kamailio[5372]: ERROR:core:main: error while initializing modules
Thanks Stagg
On Donnerstag, 30. April 2009, Stagg Shelton wrote:
I am working to get LCR implemented on my migration system, and when I try to start kamailio i find the below information in the log file, and kamailio fails to start. My lcr table has 30667 rows in it.
Hi Stagg,
in cr we had the same issue in the past, we solved it by partioning the data loading in the module code. Not sure if this is also possible to do in LCR, probably Juha know here more. What probably happens is that the lcr module try to load all data at once, and storing it temporarly in private memory.
I have read about changing the config.h file to increase the private memory, but my question is how much should I allocate. I forsee going up to more than 200,000 routes within the next 12 month period.
ERROR:db_mysql:db_mysql_convert_rows: error while converting row #2808
This suggest that it needs about 1MB of memory to load 2800 rules. So for 200k rules you'd need about 72 MB private memory, but not sure if its can be calculated this way.
Cheers,
Henning
I have rebuilt kamailio 1.4.4 with an increased private memory size of 32M. The private memory error seems to be resolved, but I am now seeing the following in the log when trying to start kamailio.
Apr 30 09:46:06 n01-sip-c61-56-atl /sbin/kamailio[19021]: ERROR:lcr:mod_init: No memory for lcr table Apr 30 09:46:06 n01-sip-c61-56-atl /sbin/kamailio[19021]: ERROR:core:init_mod: failed to initialize module lcr Apr 30 09:46:06 n01-sip-c61-56-atl /sbin/kamailio[19021]: ERROR:core:main: error while initializing modules
Thanks Stagg
On Apr 30, 2009, at 9:46 AM, Henning Westerholt wrote:
On Donnerstag, 30. April 2009, Stagg Shelton wrote:
I am working to get LCR implemented on my migration system, and
when I
try to start kamailio i find the below information in the log file, and kamailio fails to start. My lcr table has 30667 rows in it.
Hi Stagg,
in cr we had the same issue in the past, we solved it by partioning the data loading in the module code. Not sure if this is also possible to do in LCR, probably Juha know here more. What probably happens is that the lcr module try to load all data at once, and storing it temporarly in private memory.
I have read about changing the config.h file to increase the private memory, but my question is how much should I allocate. I forsee going up to more than 200,000 routes within the next 12 month
period.
ERROR:db_mysql:db_mysql_convert_rows: error while converting row
#2808
This suggest that it needs about 1MB of memory to load 2800 rules. So for 200k rules you'd need about 72 MB private memory, but not sure if its can be calculated this way.
Cheers,
Henning
I should also note that I also changed this line in the lcr_mod.c to account for the amount of rows that I have in the lcr database table.
Original #define MAX_NO_OF_LCRS 256
Changed to #define MAX_NO_OF_LCRS 32000
Stagg
On Apr 30, 2009, at 9:46 AM, Henning Westerholt wrote:
On Donnerstag, 30. April 2009, Stagg Shelton wrote:
I am working to get LCR implemented on my migration system, and
when I
try to start kamailio i find the below information in the log file, and kamailio fails to start. My lcr table has 30667 rows in it.
Hi Stagg,
in cr we had the same issue in the past, we solved it by partioning the data loading in the module code. Not sure if this is also possible to do in LCR, probably Juha know here more. What probably happens is that the lcr module try to load all data at once, and storing it temporarly in private memory.
I have read about changing the config.h file to increase the private memory, but my question is how much should I allocate. I forsee going up to more than 200,000 routes within the next 12 month
period.
ERROR:db_mysql:db_mysql_convert_rows: error while converting row
#2808
This suggest that it needs about 1MB of memory to load 2800 rules. So for 200k rules you'd need about 72 MB private memory, but not sure if its can be calculated this way.
Cheers,
Henning
On Donnerstag, 30. April 2009, Stagg Shelton wrote:
I should also note that I also changed this line in the lcr_mod.c to account for the amount of rows that I have in the lcr database table.
Original #define MAX_NO_OF_LCRS 256
Changed to #define MAX_NO_OF_LCRS 32000
Hi Stagg,
do you use a "old" version of the lcr module, e.g. the one of version 1.3 or 1.4? AFAIK this is not optimized for such a large number of routing rules, i'd suggest that you use the one from 1.5 instead, or carrierroute.
Cheers,
Henning
I'm using the lcr module in the 1.4.4 source tar.gz. I have just gotten kamailio to successfully start by increasing the shared memory using the command parameter -m 1024. I had initially thought about using carrierroute instead of LCR just because we currently use use carrierroute to send specific customers out to specific upstream carriers. I was concerned that carrierroute wasn't designed to handle such a large number of routes, and had found other posts in this mailling list where people had stated using LCR with 300,000+ routes with no issues.
I also am following the changes in the 1.5 branch and notice that LCR now uses fetch_rows like carrierroute does. I have considered upgrading directly from 1.3.3 to 1.5.1, but am cautious as I do not want to bring anything disruptive into a very stable production environment, so I fell back to 1.4.4 thinking that the code has had more time to mature, and have many issues resolved.
Stagg
On Apr 30, 2009, at 10:44 AM, Henning Westerholt wrote:
On Donnerstag, 30. April 2009, Stagg Shelton wrote:
I should also note that I also changed this line in the lcr_mod.c to account for the amount of rows that I have in the lcr database
table.
Original #define MAX_NO_OF_LCRS 256
Changed to #define MAX_NO_OF_LCRS 32000
Hi Stagg,
do you use a "old" version of the lcr module, e.g. the one of version 1.3 or 1.4? AFAIK this is not optimized for such a large number of routing rules, i'd suggest that you use the one from 1.5 instead, or carrierroute.
Cheers,
Henning
On Thu, April 30, 2009 5:21 pm, Stagg Shelton wrote:
I'm using the lcr module in the 1.4.4 source tar.gz. I have just gotten kamailio to successfully start by increasing the shared memory using the command parameter -m 1024.
Hi Stagg,
good that its work for you now.
I had initially thought about using carrierroute instead of LCR just because we currently use use carrierroute to send specific customers out to specific upstream carriers. I was concerned that carrierroute wasn't designed to handle such a large number of routes, and had found other posts in this mailling list where people had stated using LCR with 300,000+ routes with no issues.
Hm, not sure why you got this impression. There are people that use cr with a million of routing rules, it was designed for huge setups.
I also am following the changes in the 1.5 branch and notice that LCR now uses fetch_rows like carrierroute does. I have considered upgrading directly from 1.3.3 to 1.5.1, but am cautious as I do not want to bring anything disruptive into a very stable production environment, so I fell back to 1.4.4 thinking that the code has had more time to mature, and have many issues resolved.
I understand your concerns. But as Juha said, i also suggest to update to 1.5. In 1.3 and 1.4 lcr the routes are organised in a list, so lookup time is O(route number) (Juha, please correct me when i'm wrong here). The version in 1.5 uses better datastructures (like a hash table) and you should see a much better performance. The cr module uses a digit trie, with lookup time of O(searched prefix length).
Cheers,
Henning
Stagg Shelton writes:
I am working to get LCR implemented on my migration system, and when I try to start kamailio i find the below information in the log file, and kamailio fails to start. My lcr table has 30667 rows in it. I have read about changing the config.h file to increase the private memory, but my question is how much should I allocate. I forsee going up to more than 200,000 routes within the next 12 month period. I am currently working towards migrating up from openser 1.3.3 to kamailio-1.4.4-notls. I am currently not using LCR in my production openser 1.3.3 system. This is new functionality that we are implementing as part of the upgrade.
please upgrade to kamailio 1.5. it has greatly improved lcr implementation. see
http://www.kamailio.org/dokuwiki/doku.php/features:new-in-1.5.x
-- juha
2009/4/30 Juha Heinanen jh@tutpro.com:
please upgrade to kamailio 1.5. it has greatly improved lcr implementation. see
http://www.kamailio.org/dokuwiki/doku.php/features:new-in-1.5.x
I read there:
load_gws()/next_gw() functions can now be called also from FAILURE_ROUTE.
Does it mean that prior to 1.5 netx_gw() coudln't be used in FAILURE_ROUTE ??? How to use it then?
On Thu, Apr 30, 2009 at 12:39 PM, Iñaki Baz Castillo ibc@aliax.net wrote:
2009/4/30 Juha Heinanen jh@tutpro.com:
please upgrade to kamailio 1.5. it has greatly improved lcr implementation. see
http://www.kamailio.org/dokuwiki/doku.php/features:new-in-1.5.x
I read there:
load_gws()/next_gw() functions can now be called also from FAILURE_ROUTE.
Does it mean that prior to 1.5 netx_gw() coudln't be used in FAILURE_ROUTE ??? How to use it then?
next_gw was available in the failure_route in previous releases. Take a look here and you will see how to use them: http://www.voipembedded.com/resources/openser_dbtext_lcr.cfg
Regards, Ovidiu Sas
2009/4/30 Ovidiu Sas osas@voipembedded.com:
load_gws()/next_gw() functions can now be called also from FAILURE_ROUTE.
Does it mean that prior to 1.5 netx_gw() coudln't be used in FAILURE_ROUTE ??? How to use it then?
next_gw was available in the failure_route in previous releases. Take a look here and you will see how to use them: http://www.voipembedded.com/resources/openser_dbtext_lcr.cfg
Ok, I just said that since the Wiki about 1.5 features said: load_gws()/next_gw() functions can now be called also from FAILURE_ROUTE.
Thanks.
Iñaki Baz Castillo writes:
I read there:
load_gws()/next_gw() functions can now be called also from FAILURE_ROUTE.
Does it mean that prior to 1.5 netx_gw() coudln't be used in FAILURE_ROUTE ??? How to use it then?
description is not accurate. before 1.5 it was not possible to call load_gws() from failure route.
-- juha