[sr-dev] [kamailio/kamailio] starting kamailio takes too long (#2613)
David Villasmil
david.villasmil.work at gmail.com
Thu Jan 28 17:54:27 CET 2021
did you see
3.10. fetch_rows (integer)
The number of the rows to be fetched at once from database when loading the
routing data. This value can be used to tune the load time at startup. For
1MB of private memory (default) it should be below 3750. The database
driver must support the fetch_result() capability. This parameter is
tunable via the ser cfg framework.
*Default value is “2000”.*
*Example 1.10. Set fetch_rows parameter*
...
modparam("carrierroute", "fetch_rows", 3000)
...
?
Regards,
David Villasmil
email: david.villasmil.work at gmail.com
phone: +34669448337
On Thu, Jan 28, 2021 at 3:37 PM kristina258 <notifications at github.com>
wrote:
> Description
>
> Hi,
>
> I am migrating from Kamailio 4.4.7 (debian 8.1) to 5.4.3 (debian 10.7).
> 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.
>
> The modules I am using are:
>
> "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".
>
> 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.
> I did not change anything in configuration related to carrierroute module.
>
> 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")
>
> Carrierroute module loading on version 4.4.7 needed:
>
> - INFO: carrierroute [cr_db.c:317]: load_route_data_db(): *took 1s*
> - INFO: carrierroute [cr_carrier.c:100]: add_domain_data(): and INFO:
> carrierroute [cr_data.c:414]: get_domain_data_or_add(): *took 8s*
> - INFO: carrierroute [cr_data.c:655]: rule_fixup(): *took 3s*
>
> Carrierroute module loading on version 5.4.3 needed:
>
> - INFO: carrierroute [cr_db.c:317]: load_route_data_db(): *took 1s*
> - INFO: carrierroute [cr_carrier.c:100]: add_domain_data(): and INFO:
> carrierroute [cr_data.c:414]: get_domain_data_or_add(): *took 2min 23s*
> - INFO: carrierroute [cr_data.c:655]: rule_fixup(): *took 17s*
>
> 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.
> Additional Information
>
> 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
>
>
>
> - *Operating System*:
>
> Linux 4.19.0-13-amd64 #1 SMP Debian 4.19.160-2 (2020-11-28) x86_64 GNU/Linux
> Debian 10.7
>
>
> Thank you for your help.
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/kamailio/kamailio/issues/2613>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABO7UZPZOQGBIOJNDSJGVDTS4GAARANCNFSM4WXIMFYQ>
> .
> _______________________________________________
> Kamailio (SER) - Development Mailing List
> sr-dev at lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210128/a170176a/attachment-0003.htm>
More information about the sr-dev
mailing list