On 4 Sep 2023, at 15:46, Martin Nyström <martin.nystrom@connectel.se> 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.
 
root@superman.local:/# kamcmd permissions.trustedReload
Reload OK
That message should propably be changed to “Reload initiated OK"
root@superman.local:/# kamcmd permissions.trustedReload
error: 500 - ongoing reload
root@superman.local:/# 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 /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