Voice balance tops-up after CGRateS crash

115 views
Skip to first unread message

poj...@gmail.com

unread,
Aug 5, 2021, 11:40:37 PM8/5/21
to CGRateS
Hi there,

Following a big CDR export - CGRateS has crashed (BTW it does that often when the export involves a result in the order of 100K+ records), I found that the voice balances of all accounts have been re-topup'd, even though the Action is *topup_reset, the action plan's timing is monthly.


{
    "method": "APIerSv1.GetActions",
    "params": ["ACT_TOLL_FREE_200M"]
}

{
    "id": null,
    "result": [
        {
            "Identifier": "*topup_reset",
            "BalanceType": "*voice",
            "Units": "12000000000000",
            "ExpiryTime": "*unlimited"        }
    ],
    "error": null
}

Why would it be the case and what can be done about it?

Thanks. Regards,
--Sergiu

poj...@gmail.com

unread,
Aug 11, 2021, 8:24:08 AM8/11/21
to CGRateS
Nobody?

CGR...@v0.10.2 if that helps.

Thanks!

Adrian Porosnicu

unread,
Aug 16, 2021, 8:50:59 AM8/16/21
to CGRateS
Hello!

Firstly can you please open an issue on GitHub and there we will communicate.
Can you give us the steps that you made for your scenario? Also can you give us the data that you used for reproducing the issue.

Maybe you are exporting towards a server which is not coping with the export speed of CGRateS. In that case memory will overload inside CGRateS and OS will kill it's process. We have had such cases in the past and they were not related to CGRateS.

Thanks,
Adrian.

poj...@gmail.com

unread,
Aug 16, 2021, 3:59:02 PM8/16/21
to CGRateS
Hi Adrian,

Very well, I'll open a case in GitHub regarding crashes following big CDR exports.

On the main question though, any ideas on why account balances would self-topup following CGRateS' restart following a crash? I suppose this scenario can be easily replicated by sending a SIGTERM/SIGKILL to CGRateS' process. 

Thanks. Regards,
--Sergiu

Adrian Porosnicu

unread,
Aug 18, 2021, 9:36:14 AM8/18/21
to CGRateS
Hello Sergiu,

To answer your question, we need first to learn how to reproduce your issue. 

Thanks, 
Adrian

Sergiu Pojoga

unread,
Sep 1, 2021, 7:27:42 PM9/1/21
to cgr...@googlegroups.com
Just so ppl know the outcome, it turned out to be indeed a server resource limitation, as Adrian suspected. 

After increasing the RAM size from 2 to 4GB, I was able to successfully export ~250K CDR records in one shot.

Great job CGRrateS team!

Cheers,
--Sergiu

--
You received this message because you are subscribed to a topic in the Google Groups "CGRateS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cgrates/6eCplktQsec/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cgrates+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cgrates/3fdbc7e8-5928-4044-8a26-4b24acb0da5dn%40googlegroups.com.

Darren Williams

unread,
Sep 16, 2021, 2:33:40 AM9/16/21
to CGRateS
And the auto top up? I find it hard to understand how a lack of RAM could trigger that.

Sergiu Pojoga

unread,
Sep 20, 2021, 12:56:12 AM9/20/21
to cgr...@googlegroups.com
It isn't. Lack of RAM was triggering the crash during cdr export, which in turn, I suspect, was triggering the auto top up of account balances. 

Frankly, I didn't pursue the matter to induce a crash of cgrates to confirm or infirm the problem. I may at a later time if it resurfaces (production env), or maybe someone else can dig further into it.

Regards,
--Sergiu

You received this message because you are subscribed to the Google Groups "CGRateS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cgrates+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/cgrates/0d2826ea-f47b-4376-83f9-2e78f7fc2b3dn%40googlegroups.com.

Anthony Somerset

unread,
Sep 20, 2021, 4:30:02 AM9/20/21
to CGRateS
what does your auto topup action plan look like in terms of timing - its possible that it will be retriggered on a restart based on the config

Sergiu Pojoga

unread,
Sep 20, 2021, 9:14:03 AM9/20/21
to cgr...@googlegroups.com
The action plan output was posted in the first message: *topup_reset, monthly

Reply all
Reply to author
Forward
0 new messages