[Spce-user] rate-o-mat FATAL error lock wait timeout exceede

Hohl Matthias matthias.hohl at telematica.at
Thu Aug 1 17:35:13 EDT 2019

Hello Rene,


it looks like that a API cronjob on our site produce this problem.


Can you tell me where I can:

*	increase the retry count
*	decrease the rate-o-mat cdr batch size
*	increase the mysql lock timeout


I didn’t found anything about this in the config.yml file.


Thank you.



Von: Rene Krenn <rkrenn at sipwise.com> 
Gesendet: Sonntag, 21. Juli 2019 00:56
An: 'Hohl Matthias' <matthias.hohl at telematica.at>; spce-user at lists.sipwise.com
Betreff: AW: [Spce-user] rate-o-mat FATAL error lock wait timeout exceede


Contract locking apraoch was not changed actually.

Basically this can happen only if the contracts of a cdr are retrieved via panel/api while rate-o-mat tries to rate the cdr, and the panel/api request take longer time.

Do you have scripts that poll subscriber or contract collections? What times of day did the errors occur?

Eg. the credit warning job script also uses api to retrive data and was fixed to iterate the full collection, so it has longer processing times and could be causing this.


Rate-o-mat retries up to 3 times (by default). So an option for now is to increase the retry count, decrease the rate-o-mat cdr batch size or increase the mysql lock timeout.

We are currently working on refactoring the fraud and credit warning jobs.




Von: Spce-user [mailto:spce-user-bounces at lists.sipwise.com] Im Auftrag von Hohl Matthias
Gesendet: Freitag, 19. Juli 2019 23:51
An: spce-user at lists.sipwise.com <mailto:spce-user at lists.sipwise.com> 
Betreff: [Spce-user] rate-o-mat FATAL error lock wait timeout exceede




since update to 6.5.5 few months ago I regonized that rate-o-mat fails every few days.


This is the log entry:


root at spce:~# grep FATAL /var/log/ngcp/rate-o-mat.log

Jul 19 23:12:50 spce (info) rate-o-mat[10861]: FATAL: FATAL: Error executing contract row lock statement: Lock wait timeout exceeded; try restarting transaction



After a rate-o-mat restart everything works fine  for few days but then same happens again.

Is there a fix for this “new” error?



Thank you.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20190801/747fc329/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5585 bytes
Desc: not available
URL: <http://lists.sipwise.com/mailman/private/spce-user_lists.sipwise.com/attachments/20190801/747fc329/attachment.p7s>

More information about the Spce-user mailing list