How to reindex akonadi database without having to reconfigure?

Martin Steigerwald martin at lichtvoll.de
Thu Feb 2 08:45:59 GMT 2017


Am Donnerstag, 2. Februar 2017, 07:56:16 CET schrieb ianseeks:
> Hi
> 
> I'm having the "Retrieving folder..." error message on every folder that
> contains an unread item. Akonadi fsck/vacuum/top/start no longer fixes the
> problem.
> I have in the past followed the how to fix akonadi when there was a failed
> migration and that did all the work but it seemed like a hammer to crack a
> nut as you have to reconfigure kmail etc.
> 
> Is there a way to just delete the data and any related indexes to force a
> reindexing process?
> 
> I'm running out of ideas hence i hope this idea may help

Did you try "Clear Akonadi Cache" on one of the folders in question in 
Akonadiconsole. As far as I understand this is a partial clearing of the cache 
which forces Akonadi to redo the cache for the particular folder.

I bet I´d do it in the following order:

1) make sure you have backup
2) stop Kmail
3) stop Akonadi
4) make sure database process is gone
5) start Akonadiconsole
6) clear cache of one folder
7) start kmail and test result

As far as I understand you maybe could loose data with doing that, just as you 
can loose data with removing the complete database, cause while Akonadi is 
mostly a cache, there can be circumstances where it contains more than only 
cached items, i.e. when an IMAP server is not reachable to add a newly written 
mail into the sent folder… (but on that I also found that the sent mail was 
stored into the local sent mail folder instead).

I do not know exactly whether the data loss risk is only when you wipe the 
whole database, or also when you clear only the cache of one folder, but I 
warned you :)

Also I believe there was a recent bug which caused Retrieving folder contents 
displayed forever… you could research that. I am still using KDEPIM 16.04 as 
Debian has nothing newer packaged due to challenges and difficulties packaging 
Qt Webengine with Debian quality standards.

Also what I believed helped timeouts a lot is raising InnoDB buffer pool size 
*a lot*. I raised it to 1 GiB. Mysqltuner.pl recommended even more. But keep 
the amount of free memory on your system in mind. Whether that helps you or 
not mostly depends on whether Akonadi is waiting on mysqld to complete the 
queries it floods it with.

Thanks,
-- 
Martin



More information about the kdepim-users mailing list