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?