[OpenSIPS-Users] question on handling slow databases.

johan johan at democon.be
Fri Mar 26 11:02:05 EST 2021


Hi,


last week I have got a very unexpected crash.


Mar 23 12:42:18 SBC-01 /data/opensips/sbin/opensips[3718]:
ERROR:db_mysql:db_mysql_connect: driver error(2002): Can't connect to
MySQL server on '10.3.0.80' (110)
Mar 23 12:42:18 SBC-01 /data/opensips/sbin/opensips[3718]:
CRITICAL:core:sig_usr: segfault in process pid: 3718, id: 23
Mar 23 12:42:18 SBC-01 kernel: [4834876.507671] opensips[3718]: segfault
at 30382e302e93 ip 00007f0cc097178b sp 00007ffc4e8cb960 error 4 in
libmariadb.so.3[7f0cc0969000+23000]
Mar 23 12:42:18 SBC-01 kernel: [4834876.507688] Code: 85 ff 0f 84 27 01
00 00 55 48 89 e5 41 54 53 48 8b 87 f0 04 00 00 48 89 fb 48 85 c0 74 2d
4c 8b 20 4d 85 e4 74 25 49 8b 04 24 <48> 8b 40 60 48 85 c0 74 02 ff d0
4c 89 e7 e8 a2 7c ff ff 48 8b 83


upon review, then DB didn't actually crash but became very very slow.   Anyway, as I forgot to add the -w option in the init.d file, there is not much that I can do with this crash. 


Now, 
in my script, I use avpops quite often to do query's
Actually, the only write stuff that I do is to acc. 

As for avpops, I can make this easy redundant by adding a second db connection. 
But for writing to acc, what would be the best way to make this insert less error prone ? Add rabbitmq in the middle ? 

Looking forward for your advice / opinion / best practice. 



-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0xD7D896F7DDA70EC3.asc
Type: application/pgp-keys
Size: 2456 bytes
Desc: not available
URL: <http://lists.opensips.org/pipermail/users/attachments/20210326/18e97507/attachment.key>


More information about the Users mailing list