[Kde-pim] Long-running app loses mysql connection

Daniel Vrátil dvratil at redhat.com
Tue Jun 11 18:01:09 BST 2013


On Tuesday 11 of June 2013 17:00:27 David Faure wrote:
> Here's the reason zanshin can't save my events, when I let it run for a very
> long time (many days) and only use it occasionnally (unlike kmail) :
> 
> new ItemCreateJob
> Database error: DataStore::beginTransaction
> Last driver error: "QMYSQL: Unable to begin transaction"
> Last database error: "MySQL server has gone away"
> Error during executing query "INSERT INTO PimItemTable (rev, remoteRevision,
> collectionId, mimeTypeId, datetime, atime, dirty, size) VALUES (:0, :1, :2,
> :3, :4, :5, :6, :7 )" :  "Lost connection to MySQL server during query
> QMYSQL3: Unable to reset statement" Error during insertion into table
> "PimItemTable" "Lost connection to MySQL server during query QMYSQL3:
> Unable to reset statement" DataStore::rollbackTransaction(): No transaction
> in progress!
> "Append failed"
> 
> -> this looks like a timeout in the mysql connection.
> 
> KMail still works fine at that point.
> 
> Does anyone know about mysql connections dropping out, and how to avoid it,
> or how to handle this transparently in akonadi libs so that apps don't have
> to handle it themselves?

According to [0], using setConnectOption("MYSQL_OPT_RECONNECT=1")  should 
automatically restore the connection if it's lost. It could be simply added to 
the Akonadi server as a default option for MySQL backend.

Note sure how about PostgreSQL (if the problem is valid there too).

Cheers,
Dan

[0] https://bugreports.qt-project.org/browse/QTBUG-17140

-- 
Daniel Vrátil
Associate Software Engineer, KDE Desktop Team
Red Hat, Inc

GPG Key: 0xC59D614F6F4AE348
Fingerprint: 4EC1 86E3 C54E 0B39 5FDD B5FB C59D 614F 6F4A E348
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20130611/b1f97e89/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