CGRateS does not preload filter indexes (attribute_filter_indexes / supplier_filter_indexes)

49 views
Skip to first unread message

Victor Shulha

unread,
Nov 14, 2025, 10:56:07 AMNov 14
to CGRateS

Hi All, 

We’d like to discuss an issue we are seeing with CGRateS on two versions:

  • v0.10.4~dev-20240610165520-cc7210bbeee7

  • v0.11.0~dev-20250922111205-5894e0d7f349


Environment:

  • CGRateS + Kamailio node: AMD EPYC 7R13 (16 vCPU @ 3.6 GHz), 32 GB RAM, AWS gp3 SSD, AWS Nitro V5 (~12.5 Gbps)

  • Redis 7.1 node: AWS Graviton2 (2 vCPU @ 2.5 GHz), 2 GB RAM, in-memory only, AWS Nitro (~5 Gbps)


Issue description

After a "cold" start, running LoadCache correctly loads static caches, but the following indexes remain empty:

  • attribute_filter_indexes

  • supplier_filter_indexes

Screenshot 1: shows how these indexes are enabled in the configuration, but stay at zero after LoadCache is completed.

These indexes start to grow only during live Session.Auth traffic.
As they grow (up to ~300k entries), CGRateS speeds up accordingly.

Screenshot 2: shows the dynamic growth of attribute_filter_indexes, supplier_filter_indexes


Impact

For the first ~10–15 minutes after CGRates restart, even with ~60 CPS, we get SIP authentication timeouts from Kamailio via CGR agent.

Example log:

{"Event":"PBX_SESSION_AUTH_REPLY","Error":"ATTRIBUTES_ERROR:context deadline exceeded"}

Once the indexes are fully populated, CGRateS handles 100+ CPS without issues.


Question

Is there any way to make CGRateS prebuild attribute_filter_indexes and supplier_filter_indexes at startup, so we don’t have the long warm-up period with SIP auth timeouts?

Screenshot_2.png
Screenshot_1.png

Ionut Boangiu

unread,
Nov 20, 2025, 8:14:13 AM (13 days ago) Nov 20
to CGRateS
Hi Victor,

Could you please open an issue where you also provide the complete reproducing steps?

To answer your question: as you're doing now should work (only on v0.11), otherwise you can also set "precache" to true for the specific partitions that you want to be loaded on startup.

Thanks,
Ionuț

Victor Shulha

unread,
Nov 21, 2025, 5:47:42 AM (12 days ago) Nov 21
to CGRateS
Hi Ionuț,

Thanks for the hints. We will try to test them and, in case of any difficulties, will create a report on GitHub.
Reply all
Reply to author
Forward
0 new messages