[OpenSIPS-Users] opensips will not start while loading huge blacklist

Bogdan-Andrei Iancu bogdan at opensips.org
Tue Oct 2 09:55:01 EDT 2018


OK, I pushed on master a patch to move the initial data load after the 
startup sequence. The patch should apply to 2.4 also.

https://github.com/OpenSIPS/opensips/commit/32cba1d751ee5a5b705da97ac4333fcad3d67728

While checking the module, I found some issues with it:

     * before my patch, the load (for same data) was independently done 
in each opensips process (even if the data is shared) :)

     * the "reload" is no error pron - if the new data load fails, the 
old existing data is lost

     * during the data reload the module has no data, so it cannot 
operate (it will actually block) - normally it should continue with the 
old data until the new data is fully loaded and validated.

Let me know if the patch makes a different for you and I will backport 
it to 2.4 too.

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   http://www.opensips-solutions.com
OpenSIPS Bootcamp 2018
   http://opensips.org/training/OpenSIPS_Bootcamp_2018/

On 10/02/2018 04:18 PM, Bogdan-Andrei Iancu wrote:
> Hi,
>
> Taking a closer look at the module (to be honest I do not user it, as 
> drouting does a similar job) I see the module is loading the data into 
> memory. It is doing this during the init stage, holding back the 
> entire OpenSIPS startup.
> Module doing similar heavy db load were changed to do the load 
> post-startup. Let patch the module to decouple the loading from the 
> startup, so that OpenSIPS will start without delays.
>
> Regards,
> Bogdan-Andrei Iancu
>
> OpenSIPS Founder and Developer
>    http://www.opensips-solutions.com
> OpenSIPS Bootcamp 2018
>    http://opensips.org/training/OpenSIPS_Bootcamp_2018/
> On 10/02/2018 04:04 PM, Jon Abrams wrote:
>> OpenSIPs is loading the global blacklist into a digit trie structure 
>> into shared memory on startup (or reload_blacklist command). That 
>> causes the startup delay.
>>
>> - Jon
>>
>> On Tue, Oct 2, 2018 at 7:55 AM Abdul Basit <basit.engg at gmail.com 
>> <mailto:basit.engg at gmail.com>> wrote:
>>
>>     Hi Bogdan,
>>
>>     I don't think so its translating to DB query on run time, instead
>>     its caching the blacklist.
>>     I am saying so because opensips response is quick, where as when
>>     I query manually from DB, it take some time even prefix col. is
>>     indexed.
>>     Moreover, while opensips restart i get following warnings in syslog:
>>
>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20181002/06a934de/attachment.html>


More information about the Users mailing list