[Kde-pim] RFC: solution for the 'MySQL server has gone away' error

Christophe Giboudeaux cgiboudeaux at gmail.com
Sat Feb 20 11:06:58 GMT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

If I let Akonadi running while I sleep, I often see this kind of
irritating error while drinking coffee:

[akonadiserver] Error during executing query "SELECT PimItemTable.id,
PimItemTable.rev, PimItemTable.remoteId, MimeTypeTable.name,
ResourceTable.name, PimItemTable.size, PimItemTable.datetime,
PimItemTable.collectionId FROM PimItemTable, MimeTypeTable,
CollectionTable, ResourceTable WHERE ( PimItemTable.mimeTypeId =
MimeTypeTable.id AND PimItemTable.collectionId = CollectionTable.id AND
CollectionTable.resourceId = ResourceTable.id AND ( PimItemTable.id = :0
) ) ORDER BY PimItemTable.id ASC" :  "MySQL server has gone away QMYSQL:
Unable to execute query"
[akonadiserver] Error during executing query "SELECT count(*) FROM
PimItemTable WHERE ( collectionId = :0 )" :  "MySQL server has gone away
QMYSQL: Unable to execute query

This error was also reported on the kdepim-users ML and Martin also
mentioned it here: https://bugs.kde.org/show_bug.cgi?id=226400#c8
The short term solution is to stop sleeping but I'm almost sure some
users will complain. So, here's another solution :-)

The default timeout value for MySQL instances running over network or
using sockets is 28800 seconds, which means the connection to the DB
will be terminated after 8 hours of inactivity.

The solution is to change the 'wait_timeout' [1] value to something
better. the range is 1-31536000 but I doubt we need a 365 days timeout.

Suggestions ?

Christophe.

[1]
http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.12 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAkt/wlIACgkQxN4yrBrjqDN5IACfSfqoQOHhDkFMynjgcltjajaI
Q5MAoK7tDewbf7/rk3vK7dFJRyvk/Ml+
=aQ1X
-----END PGP SIGNATURE-----
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/



More information about the kde-pim mailing list