[Kde-pim] akonadi: release unused connections to qpsql

P. Christeas xrg at linux.gr
Mon Nov 10 20:37:30 GMT 2014


On Monday 10 November 2014, Daniel Vrátil wrote:
> 	Daniel Vrátil <dvratil at redhat.com>
>  I would suggest a slightly different solution:
> 
> Let's have the timeout implemented in server/src/connection.cpp, which
> represents individual client connection to the Server. There's this method
> called Connection::slotNewData() ...

Well, I spent a few hours, today, drafting an implementation for that. You can 
find it at:
 https://github.com/xrg/akonadi/commit/e421f51f0cf501e5e5

(code written against 1.12 for my distro, but could be forward-ported, I 
suppose)

The good news is, that it does reduce the active Postgres connections from 47 
(in my case) down to <10 and even 0 at some points.

Bad news, however, is that it does occasionally segfault. Even though 
DataStore::close() does reset the QueryCache and connection, it seems that 
there is still some lingering Query or pqResult which causes instability. I'm 
investigating...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 316 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20141110/93b65af2/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