[SR-Users] Htable not reloading from db on expiry

Daniel-Constantin Mierla miconda at gmail.com
Fri Jun 28 08:39:20 CEST 2019


Hello,
I haven't added that feature, but afaik, db_expires control if the value of
the expires column from database is loaded in memory. htable does not
automatically reload anything from database -- it does it at startup and
then only upon an RPC command.
You can eventually make a cron job that issues the rpc reload command
periodically.
Cheers,
Daniel

On Fri, Jun 28, 2019 at 12:34 AM Daniel Greenwald <dgreenwald at gmail.com>
wrote:

> I have an htable that loads from mysql. The data loads fine on startup but
> disappears on expiry. If I issue kamcmd htable.reload it loads again until
> expiry. It seems as if db_expires is not taking affect. I see them expiring
> in the debug log but not an errors. Mysql general log does not show any
> attempt to connect on expiry. Another odd thing is that if I set the
> expires column in db to anything other than 0 the data doesn't load at all.
> Any ideas would be appreciated.
>
> modparam("htable", "timer_interval", 10)
> modparam("htable", "htable",
> "h=>size=20;autoexpire=20;dbtable=validdomains;updateexpire=0;")
> modparam("htable", "db_url", AUTHDBURL)
> modparam("htable", "db_expires", 1)
>
> create or replace view validdomains as select distinct subscriber.domain
> as key_name, 1 as key_value, 0 as key_type, 0 as value_type, 0 as expires
> from subscriber;
>
>
> _______________________________________________
> Kamailio (SER) - Users Mailing List
> sr-users at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>


-- 
Daniel-Constantin Mierla - http://www.asipto.com
http://twitter.com/#!/miconda - http://www.linkedin.com/in/miconda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20190628/0d769338/attachment.html>


More information about the sr-users mailing list