Description

Carrierroute module takes now 16 minutes to load about 50'000 entries from postgres-db.
In version 5.0.3 it was 10 seconds from the same db.

Troubleshooting

Reproduction

Install kamailio 5.0.3 and fill your carrierroute table with thousands of entries. See how fast its loaded.
Then install 5.0.4 and see how long it takes now.
You can observe the query "SELECT * FROM carrierroute WHERE carrier=1 and domain=1 and prob>0" multiple times in the postgres-db log.

Debugging Data

none.

Log Messages

not needed.

SIP Traffic

not needed.

Possible Solutions

Perhaps try to do the check "in-memory" instead generate a new sql-query.

Additional Information

This bug exists in Kamilio versions >=5.0.4 and is (potentially) introduced by:

commit 9800aba
Author: Huseyin Dikme hueseyin.dikme@1und1.de
Date: Tue Sep 12 15:37:17 2017 +0200
carrierroute: warning for the same carrier/domain having routes with only 0 probability
- While starting kamailio or reloading the routes, if the same carrier/domain pairs do not have
any route with a probability other than 0 (zero) then an error log will be printed on the screen.
Besides, the log "invalid dice_max value" in the cr_func.c has been made more clear.
(cherry picked from commit 9741bee)

Ubuntu 20.04.2 LTS
Linux 5.4.0-66-generic #74-Ubuntu SMP Wed Jan 27 22:54:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.