<p></p>
<h3>Description</h3>
<p>Hi,</p>
<p>I am migrating from Kamailio 4.4.7 (debian 8.1) to 5.4.3 (debian 10.7).<br>
I changed the neccessary changes in configuration (replaced MI with RPC) and I tried to start the kamailio. The issue is that it takes about 3minutes to start. On the older version 4.4.7 it started aproximetly in 20s.</p>
<p>The modules I am using are:</p>
<pre><code>"cfgutils.so","db_mysql.so","kex.so","tm.so","tmx.so","sl.so","rr.so","pv.so","maxfwd.so","textops.so","siputils.so","xlog.so","sanity.so","ctl.so","jsonrpcs.so","exec.so","carrierroute.so","avpops.so","sqlops.so","dmq.so","htable.so","dialog.so","acc.so","acc_radius.so","dispatcher.so","dialplan.so","textopsx.so","statsd.so","app_perl.so","http_async_client.so".
</code></pre>
<p>I assume the issue is caused by carrierroute module. It takes also about 3 minutes to reload routes (when the kamailio service is running) using rpc command cr.reload_routes.<br>
I did not change anything in configuration related to carrierroute module.</p>
<pre><code>modparam("carrierroute", "config_source", "db")
modparam("carrierroute", "db_url", DBURL)
modparam("carrierroute", "match_mode", 128)
modparam("carrierroute", "avoid_failed_destinations", 0)
modparam("carrierroute", "carrierroute_table", "carrierroute_view")
</code></pre>
<p>Carrierroute module loading on version 4.4.7 needed:</p>
<ul>
<li>INFO: carrierroute [cr_db.c:317]: load_route_data_db():  <strong>took  1s</strong></li>
<li>INFO: carrierroute [cr_carrier.c:100]: add_domain_data(): and INFO: carrierroute [cr_data.c:414]: get_domain_data_or_add(): <strong>took 8s</strong></li>
<li>INFO: carrierroute [cr_data.c:655]: rule_fixup(): <strong>took 3s</strong></li>
</ul>
<p>Carrierroute module loading on version 5.4.3 needed:</p>
<ul>
<li>INFO: carrierroute [cr_db.c:317]: load_route_data_db():  <strong>took  1s</strong></li>
<li>INFO: carrierroute [cr_carrier.c:100]: add_domain_data(): and INFO: carrierroute [cr_data.c:414]: get_domain_data_or_add(): <strong>took 2min 23s</strong></li>
<li>INFO: carrierroute [cr_data.c:655]: rule_fixup(): <strong>took 17s</strong></li>
</ul>
<p>I have also compiled kamailio version 5.0 on both (debian 8.1 and debian 10.7), but it also took so long to start on both machines.</p>
<h3>Additional Information</h3>
<pre><code>version: kamailio 5.4.3 (x86_64/linux) 06bd17
flags: USE_TCP, USE_TLS, USE_SCTP, TLS_HOOKS, USE_RAW_SOCKS, DISABLE_NAGLE, USE_MCAST, DNS_IP_HACK, SHM_MMAP, PKG_MALLOC, 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_BLACKLIST, 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: 06bd17
compiled on 16:10:30 Jan 25 2021 with gcc 8.3.0

</code></pre>
<ul>
<li><strong>Operating System</strong>:</li>
</ul>
<pre><code>Linux 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
Debian 10.7

</code></pre>
<p>Thank you for your help.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/issues/2613">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZPZOQGBIOJNDSJGVDTS4GAARANCNFSM4WXIMFYQ">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABO7UZMIT3EA6UO6XW6QLETS4GAARA5CNFSM4WXIMFY2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4L3TYF5Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/issues/2613",
"url": "https://github.com/kamailio/kamailio/issues/2613",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>