Hello,

it is not taking so long to load the records, there is a limit related
to how often the reload commands can be executed:

  -
https://www.kamailio.org/docs/modules/stable/modules/permissions.html#permissions.p.reload_delta

It is by design for safety reasons. If you do need reloading very often,
it might be just better to match with sql query (sqlops) directly over
the database table records.

Cheers,
Daniel

On 05.09.23 10:19, Martin Nyström wrote:
>
> Hey OEJ 😊
>
>  
>
> Yes, the message returned should be updated. However, before resorting
> to htables I am still curious why it would take ~8 seconds to load my
> 4-row large, trusted table from db.
>
> Is there a way I can troubleshoot this further? I’ve solved this
> temporary with a queue for the rpc requests.
>
>  
>
>  
>
>  
>
> /M
>
>  
>
> *From: *Olle E. Johansson <[email protected]>
> *Date: *Tuesday, 5 September 2023 at 09:13
> *To: *Kamailio (SER) - Users Mailing List <[email protected]>
> *Subject: *[SR-Users] Re: kamcmd reload is slow or blocking additional
> reloads
>
>
>       
>
> *CAUTION:*This email originated from outside the organization. Do not
> click links or open attachments unless you recognize the sender and
> know the content is safe.
>
>  
>
>  
>
>
>
>     On 4 Sep 2023, at 15:46, Martin Nyström
>     <[email protected]> wrote:
>
>      
>
>     Hello,
>
>      
>
> Hi Martin :-) !
>
>
>
>     Running ”kamcmd permissions.trustedReload” it instantly returns
>     “Reload OK” but I cannot repeat the reload for about 8 seconds.
>     This is the same for dialplan.reload and dispatcher.reload.
>
>      
>
>     [email protected] <mailto:[email protected]>:/# kamcmd
>     permissions.trustedReload
>
>     Reload OK
>
> That message should propably be changed to “Reload initiated OK"
>
>     [email protected] <mailto:[email protected]>:/# kamcmd
>     permissions.trustedReload
>
>     error: 500 - ongoing reload
>
>     [email protected] <mailto:[email protected]>:/# kamcmd
>     permissions.trustedReload
>
>     error: 500 - ongoing reload
>
>      
>
>     There are scenarios where I might need to reload the permission
>     table multiple times within this 8 second window. Is this some
>     kind of intended block or is something at fault?
>
>      
>
>     /modparam("db_mysql", "ping_interval", 60)/
>
>     /modparam("db_mysql", "timeout_interval", 4)/
>
>     /modparam("db_mysql", "auto_reconnect", 1)/
>
>     /modparam("db_mysql", "opt_ssl_mode", 0)/
>
>     /modparam("permissions", "db_url",
>     "//mysql://kamailio:xxxxx@aws-rds-database/
>     <mysql://kamailio:xxxxx@aws-rds-database>/ ///kamailio")/
>
>      
>
>     /version: kamailio 5.7.1 (x86_64/linux) /
>
>     /flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS,
>     DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC,
>     MEM_JOIN_FREE, Q_MALLOC, F_MALLOC, TLSF_MALLOC, DBG_SR_MEMORY,
>     USE_FUTEX, FAST_LOCK-ADAPTIVE_WAIT, USE_DNS_CACHE,
>     USE_DNS_FAILOVER, USE_NAPTR, USE_DST_BLOCKLIST, HAVE_RESOLV_RES,
>     TLS_PTHREAD_MUTEX_SHARED/
>
>     /ADAPTIVE_WAIT_LOOPS 1024, MAX_RECV_BUFFER_SIZE 262144,
>     MAX_URI_SIZE 1024, BUF_SIZE 65535, DEFAULT PKG_SIZE 8MB/
>
>     /poll method support: poll, epoll_lt, epoll_et, sigio_rt, select./
>
>     /id: unknown /
>
>     /compiled with gcc 10.2.1/
>
>      
>
>      
>
> Maybe think about using htables instead as you can manipulate them easier.
>
>  
>
> We may want a way to check last reload of trusted table in order to
> confirm that it was loaded ok. 
>
>  
>
> /O
>
>
> __________________________________________________________
> Kamailio - Users Mailing List - Non Commercial Discussions
> To unsubscribe send an email to [email protected]
> Important: keep the mailing list in the recipients, do not reply only to the 
> sender!
> Edit mailing list options or unsubscribe:


-- 
Daniel-Constantin Mierla (@ asipto.com)
twitter.com/miconda -- linkedin.com/in/miconda
Kamailio Consultancy - Training Services -- asipto.com
Kamailio World Conference - kamailioworld.com
__________________________________________________________
Kamailio - Users Mailing List - Non Commercial Discussions
To unsubscribe send an email to [email protected]
Important: keep the mailing list in the recipients, do not reply only to the 
sender!
Edit mailing list options or unsubscribe:

Reply via email to