[OpenSIPS-Users] Best way to load data into local cache

Liviu Chircu liviu at opensips.org
Mon Feb 22 11:07:46 CET 2016


Hi John,

By any chance, is the /"100 records at a time//" /issue accompanied by a 
*"max while loops encountered"* error? If yes, you can get around it by 
setting "max_while_loops=1000000" in your OpenSIPS script.

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 19.02.2016 16:46, John Quick wrote:
> Using version 2.1.1 of OpenSIPS
> I want to load several hundred records into local cache memory on startup.
> I've tried avp_db_query to read all data into an avp, then a loop to write
> it from the avp into cache memory, but it can only do 100 records at a time.
> Is this simply a limitation of all avp's?
>
> Is there another way, a better way?
>
> Why do I want to do this? Because I want to check each INVITE ruri
> destination username against a list of known "suspicious" destination
> prefixes (perhaps 1000 records). Each call may require several checks
> because the list contains prefixes of varying lengths. I am concerned that
> queries made directly to the MySQL table as each INVITE request is received
> could impair performance and would put constant unwanted load on the MySQL
> server.
>
> John Quick
> Smartvox Limited
> Web: www.smartvox.co.uk
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20160222/4860dfe5/attachment.htm>


More information about the Users mailing list