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

Volker Krause vkrause at kde.org
Mon Feb 22 07:45:29 GMT 2010


On Saturday 20 February 2010 12:06:58 Christophe Giboudeaux wrote:
> 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 ?

Sounds like a good short-term solution to me, at least when using the internal 
MySQL server (otherwise we cannot enforce specific config values). IMHO the 
real solution is to reconnect to the database in case of a timeout, but 
that's slightly more complicated. Being able to reduce the timeout for 
testing is extremely useful though.

Thanks for investigating this :)

regards
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20100222/283c3199/attachment.sig>
-------------- next part --------------
_______________________________________________
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