[Spce-user] Lost connection to MySQL server during query (2013)

Matthias Hohl matthias.hohl at telematica.at
Mon Feb 15 05:38:34 EST 2016


Hello,

 

I want to give you a short update: The problem is still there.

 

If we do a mysql dump wie got following messages:

Also with mysql dump “lock-tables” or “single-transaction” there is no difference. By doing mysql dump the db lost connection, with everytime the same failure:

 

Feb 15 01:00:16 spce (local7.err) proxy[20447]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 15 01:00:16 spce (local7.err) proxy[20447]: ERROR: <core> [db_query.c:339]: db_do_update(): error while submitting query

Feb 15 01:00:16 spce (local7.err) proxy[20447]: ERROR: usrloc [ucontact.c:1142]: db_update_ucontact_ruid(): updating database failed

Feb 15 01:00:16 spce (local7.err) proxy[20447]: ERROR: usrloc [ucontact.c:1658]: update_contact_db(): failed to update database

Feb 15 01:00:16 spce (local7.err) proxy[20447]: ERROR: registrar [save.c:775]: update_contacts(): failed to update contact

 

We separate now the mysql dump from our other backup script, so the mysql dump will be done only 1 time a day at 01:00 o’clock to temporary fix the connection lost problem, until we get some input from you.

But in the meantime we found another “connection lost” problem, which is not relevated to our mysqldump backup script.

 

It happens today 4 times at different times:

 

Feb 15 10:37:09 spce (local7.err) proxy[20453]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 15 10:37:09 spce (local7.err) proxy[20453]: ERROR: <core> [db_query.c:292]: db_do_delete(): error while submitting query

Feb 15 10:37:09 spce (local7.err) proxy[20453]: ERROR: dialog [dlg_db_handler.c:620]: remove_dialog_from_db(): failed to delete database information

 

I believe this could also be correlating with the “redis counter” problem I posted (Concurrent max calls exceeded for callee) some days before. Maybe is this the reason, why the redis counter must be restarted to clear the active dialogs out ouf db.

 

Could this be true? And if yes, the main problem is the mysql lost connection problem, but how to fix that?

Has anybody maybe a solution for this problem?

 

It is very annoying if there are db lost connection problems :/

 

Thank you very much for any help.

 

 

 

Von: Spce-user [mailto:spce-user-bounces at lists.sipwise.com] Im Auftrag von Matthias Hohl
Gesendet: Donnerstag, 11. Februar 2016 15:21
An: spce-user at lists.sipwise.com
Betreff: [Spce-user] Lost connection to MySQL server during query (2013)

 

Hello,

 

we found a problem with SPCE and MySQL, so subscribers can't connect at some time:

If we check log file, we see that the MySQL DB has a lost connection error.

 

We have a intention that it maybe has something in common with our mySQL backup script, cause it just happens, and this not everytime, when the cronjob doing the script.

I think it could be a problem with the mysqldump, that this freeze the tables and SPCE couldn't write into the tables.

 

We try now with "--lock-tables=false" and waiting, if this happens again in the next few hours.

What do you think, any other idea about that?

 

Thanks.

 

Backup-Job:

#!/bin/sh

DEST=backup-`date +"%Y%m%d-%H%M"`

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

export PATH

 

/usr/bin/mysqldump -uroot -pvN85tzTPp65QfW9 -A --events > /tmp/$DEST.mysql.sql

tar czpf /tmp/$DEST.tgz -C / etc/ngcp-config etc/mysql home/jail/home/cdrexport -C /tmp $DEST.mysql.sql

rm -f /tmp/$DEST.mysql.sql

 

/usr/bin/ftp -pn >/dev/null 2>&1 <<end

open  <ftp://ftp.xxx.xxx> ftp.xxx.xxx

user xxx.xxx xxxx

put /tmp/$DEST.tgz $DEST.tgz

bye

end

 

rm -f /tmp/$DEST.tgz

 

Cronjob:

0,30 * * * *    /root/backup.sh

 

 

 

ERROR MESSAGE:

Feb 10 00:00:25 spce (local7.err) proxy[3749]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 00:00:25 spce (local7.err) proxy[3753]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 00:00:28 spce (local7.err) proxy[3741]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 00:00:29 spce (local7.err) proxy[3756]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 00:00:29 spce (local7.err) proxy[3752]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 00:00:31 spce (local7.err) proxy[3742]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 00:00:31 spce (local7.err) proxy[3747]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 00:30:18 spce (local7.err) proxy[3745]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 00:30:19 spce (local7.err) proxy[3742]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 00:30:19 spce (local7.err) proxy[3756]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 00:30:19 spce (local7.err) proxy[3741]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 02:00:17 spce (local7.err) proxy[3752]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 02:00:17 spce (local7.err) proxy[3749]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 02:00:17 spce (local7.err) proxy[3745]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 02:30:22 spce (local7.err) proxy[3752]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 02:30:22 spce (local7.err) proxy[3742]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 02:30:22 spce (local7.err) proxy[3747]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 02:30:22 spce (local7.err) proxy[3745]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 02:30:23 spce (local7.err) proxy[3753]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 03:00:19 spce (local7.err) proxy[3747]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 03:00:20 spce (local7.err) proxy[3749]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 03:00:22 spce (local7.err) proxy[3753]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 03:00:22 spce (local7.err) proxy[3745]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 03:00:23 spce (local7.err) proxy[3752]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 03:00:26 spce (local7.err) proxy[3749]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 03:30:22 spce (local7.err) proxy[3747]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 03:30:22 spce (local7.err) proxy[3753]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 03:30:23 spce (local7.err) proxy[3749]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 06:30:19 spce (local7.err) proxy[3747]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 06:30:19 spce (local7.err) proxy[3752]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 06:30:19 spce (local7.err) proxy[3742]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 06:30:19 spce (local7.err) proxy[3753]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 06:30:19 spce (local7.err) proxy[3741]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 06:30:19 spce (local7.err) proxy[3756]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

Feb 10 08:30:20 spce (local7.err) proxy[3747]: ERROR: db_mysql [km_dbase.c:124]: db_mysql_submit_query(): driver error on query: Lost connection to MySQL server during query (2013)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sipwise.com/pipermail/spce-user_lists.sipwise.com/attachments/20160215/a8036837/attachment-0001.html>


More information about the Spce-user mailing list