Reply to topic

Kmail & Akonadi Performance Issues

DeMus
Registered Member
Posts
139
Karma
0
I have just installed Manjaro Linux KDE in a VM. Installed Kontact and Kmail because I wanted to give them another chance. Sorry to say this but it is a disaster. Can not even start the program correctly. I see a small window asking for my e-mail account, I type it and the info is gone, program crash, over and over. A year or so ago it was still usable, but not now. What happened? Is it kmail, is it kontact or is it the dreadful akonadi? Why make things so complicated? Why not make it a normal e-mail program like there are so many others? I really believe this will never work and I hate that cause I love KDE and I want to use the KDE programs, including Kontact and Kmail, but they need to work which at the moment they don't.
User avatar Michael
Registered Member
Posts
92
Karma
0
OS
I just installed it on a new installation of KaOS Linux and everything was fine. It must something be either with your Manjar install or VM setup.


Michael, proud to be a member of KDE forums since 2008-Oct. / KaOS Linux user
MarkRS
Registered Member
Posts
30
Karma
0
OS
@Ian Scott, did you get any improvement with this?

FWIW, I'm seeing the same symptoms (KMail producing "stale notification" errors for deleted files), with the same regret for what should be a good mail client.

This is KMail 5.4.2 in Kontact (5.4.2) under Fedora.

I've seen a bug report suggesting this is an acknowledged regression bug (I think), but since, like you, this reduces KMail to an almost unusable state for me, I'd'a thought there would be a lot of noise about it. Maybe everyone's gone :(
ianscott
Registered Member
Posts
23
Karma
0
No Mark - have not had any improvement. Kmail was simply causing me too much lost time and I had to switch to Thunderbird just to be able to carry on some business here. Before that, it was seriously eating up HOURS of my day.

It is with much regret to see Kmail in the state that it is presently in, from here as well.
rgaelzer
Registered Member
Posts
39
Karma
0
OS
Dear ianscott:
I just noticed this thread.
In the last few days I've been having the same kind of trouble with kmail.
The infamous "Retrieving Folder Contents" page has always been around (at least since the move to kmail2), but after a (relatively) short time it used to go away.
Now, anytime I want to access an older message or any other folder from the inbox, it just pops up and sits there...
I inserted a link with a screenshot of kmail's window. Hope you can see it. Is the error message at the bottom the same you get?
https://drive.google.com/file/d/0B6mdjD_EL95gR2M1NEdVVWNVVlU/view?usp=sharing
Were you ultimately able to solve the bug using akonadictl?
I hope this issue is eventually solved, otherwise I'll have to altogether abandon kmail (in my case too, after many years using it).
Thanks.
ianscott
Registered Member
Posts
23
Karma
0
@rgaelzer : I am unable to view the image - get a warning in my browser that it could not negotiate that https protocol for some reason.

But yes, that is ONE of the problems here.

I was actually running OpenSuse Tumbleweed - but twice now, have experienced other unrelated update issues and decided to install Leap. I thought maybe that the version of kmail that comes with Leap might be more stable and tried kmail... but no, it is not anymore stable.

Now, when I click on my Trash folder, akonadi seems to just crash and I get a message in Kmail that local folders are "broken." Kmail is pretty much useless now.

I do not like Thunderbird much - but at least it works so that is what I am using now.
User avatar einar
Administrator
Posts
3402
Karma
7
OS
The "Retrieving Folder Contents" issue should be solved in either 16.12.3 or 17.04 (out later next month). If possible though, please open separate threads for your issues.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
bugzy
Registered Member
Posts
5
Karma
0
OS and Desktop Details:
Fedora 25
KMail 5.4.3
Kontact 5.4.3
KDE Frameworks: 5.33.0
KDE Plasma: 5.9.4
Qt: 5.7.1

Quick Comment:
I also (long time kmail user 2003) am experiencing the issues described here, but I think I have narrowed down the problem to akonadi's cache of the various email folders.

Symptoms of Problem:
  1. Perpetual duplicates of emails
  2. Attempting to view mail results in "Retrieving folder contents" in mail view and status bar shows: "Unable to fetch item from backend (collection -1) ..."
  3. Once a local folder starts showing the signs described above, attempting to remove duplicates using "Folder > Remove Duplicate Messages" always results in failure.
  4. Running akonadictl restart fixes point 2 temporarily but not point 3

Steps for a longer lasting solution than akonadictl restart :
  • Exit kmail or kontact
  • Run akonadictl fsck (note: this only shows problems but does not fix them, this is another bug entirely)
  • Attempt to fix issues reported by akonadictl fsck such as
    - actually move unreferenced external files to lost and found (i.e "Found unreferenced external file: /home/user/.local/share/akonadi/file_db_data/35/335235_r0" to /home/user/.local/share/akonadi/file_lost+found/)
    - delete the duplicate message files from your local imap directories in /home/user/.local/share/local-mail/...
    The crucial part follows
  • Open Akonadi Console (cmd: akonadiconsole)
  • Select the "Browser" Tab
  • CTRL+ select all folders that display the problems mentioned earlier
  • Right click on selected folder or one of the selected folders and click "Clear Akonadi Cache"
  • Once the process is complete (Akonadi Console interface may hang for a little bit), exit Akonadi Console and start Kmail/Kontact
  • Kmail/Kontact will take its time reloading the contents of the affected folders when you select them, but all the problems listed above except for point 1 will no longer be an issue, even after fetching email again.

Having mentioned this, I am not sure my deleting my Akonadi database did not solve the problem for me earlier. I suppose the bigger issue for me now is how to report this as a bug. Nevertheless, I hope some others will be able to confirm that this workaround actually helps their situation.
User avatar einar
Administrator
Posts
3402
Karma
7
OS
A mitigation for the duplicate emails has been put in place for Applications 17.08 (out in August). A more complete fix is in the works, but with an unknown ETA at this point.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
johanc
Registered Member
Posts
18
Karma
0
OS
Using Kmail 5.5.1 and I can't read more than a few mails after being stuck on "retrieving folder contents".
mfraser
Registered Member
Posts
17
Karma
0
OS
I upgraded to Kubuntu 17.04 from 16.10 this week and since then I've constantly had the "Please wait..." message when trying to read emails. I even tried deleting the .local/share/.akonadi folder which worked to start with, but after fixing all my filters by the end of the day I was back to the "Please wait..." message.

It wouldn't even reliably display HTML emails. If I clicked on another email and then went back to the previous email it would display correctly.
johanc
Registered Member
Posts
18
Karma
0
OS
I have the same issues as you, I filled a bug report for the HTML problem here, no answer yet...

https://bugs.kde.org/show_bug.cgi?id=381194
tuxolinuxt
Registered Member
Posts
4
Karma
0
I am facing the same issue on my machine. Kmail is configured to retrieve messages from 5 IMAP accounts. When trying to open a piece of mail, message "Retrieving folder contents, please wait" appears. No matter how long you wait, the message is not opened.
New emails are not constantly shown either. It takes a long time until they eventually appear in KMail.

Restarting Akonadi solves the issue, at least temporarily.

My IMAP accounts are configured the same way in Thunderbird and there is no such issue, as it does not rely on Akonadi.

Kmail version is 5.5.3, KDE Framekorks 5.36.
chrisn
Registered Member
Posts
3
Karma
0
Hey,

I've recently been having exactly these problems on a Debian Jessie system. I have also been using Kmail since about 2003 with no serious problems, but this is a show stopper for me as well. Did you find a solution?

I have: deleted ~/.local/share/akonadi, deleted index files in Mail folder, run akonadictl ad nauseam as you have. Nothing helps, I also have the duplicate email issue as well as read mails not being marked read, mails not loading etc.

Chris

ianscott wrote:Here is what I think is going on, but I cannot see any useful information in the console after restarting akonadictl:

There are duplicate emails in my inbox that have been previously deleted, but for whatever reason, are still in the inbox.

When I try to delete them - that is when kmail seems to just freeze.

Running akonaditctl fsck and vacuum does not correct the problem.

Each time I run akonadictl fsck - it seems to "see" the same deleted messages but doesn't actually do anything with them apparently. Every run of akonadictl fsck finds the same duplicates and items that "has RID and is dirty" and ends with

org.kde.pim.akonadiserver: "Migrating parts to new cache hierarchy..."
Migrating parts to new cache hierarchy...
org.kde.pim.akonadiserver: "Consistency check done."
Consistency check done.


I am not sure what the expected behaviour of akonadictl fsck is - but in previous versions of kmail, when I ran this it seemed to clear up the problems for a time.

But I'm wondering if akonadictl fsck is just not doing it's job with this version or OpenSuse Tumbleweed packages.

After awhile - 15 minutes perhaps (after trying to delete messages that I believe are duplicates of emails already previously deleted), and after running akonadictl fsck, I see this:

org.kde.pim.akonadiserver: ItemRetrievalJob finished for request 0x7f14e001ec70 , error: "Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
org.kde.pim.akonadiserver: posting retrieval request for items (611228) there are 1 queues and 0 items in mine
org.kde.pim.akonadiserver: ItemRetrievalJob Akonadi::Server::ItemRetrievalJob(0x7f15180716f0) started for request 0x7f14e000d9a0
org.kde.pim.akonadiserver: processing retrieval request for item (611228) parts: ("RFC822") of resource: "akonadi_maildir_resource_0"
org.kde.pim.akonadiserver: Database "akonadi" opened using driver "QMYSQL"
org.kde.pim.akonadiserver: ItemRetrievalJob finished for request 0x7f14e000d9a0 , error: "Unable to retrieve item from resource: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."
org.kde.pim.akonadiserver: posting retrieval request for items (611228) there are 1 queues and 0 items in mine
org.kde.pim.akonadiserver: ItemRetrievalJob Akonadi::Server::ItemRetrievalJob(0x7f151802cc80) started for request 0x7f14e002da80
org.kde.pim.akonadiserver: processing retrieval request for item (611228) parts: ("HEAD", "RFC822") of resource: "akonadi_maildir_resource_0"
org.kde.pim.akonadiserver: Database "akonadi" opened using driver "QMYSQL"
hankivy
Registered Member
Posts
4
Karma
0
I was having issues with Kmail, duplicate messages, etc. I used the process described in the post https://forum.kde.org/viewtopic.php?f=215&t=138233&hilit=resource+broken&start=30#p375456 by user https://forum.kde.org/memberlist.php?mode=viewprofile&u=48597, bugzy.

Every thing looked good, and I started to mark a lot of messages as read. This seems to be a high intensity operation in my mdir email folders.
It would require moving each message file from a .../new/. folder to a .../cur/. folder. NOTE The file time properties and previous errors lead me to believe that
the files are actually being copied to the .../cur/. folder, and the original files are deleted. [File time properties do not change if the file is moved.
But the file time properties reflect the time of being marked. My duplicate files were a file in the .../new/. folder, and a file of the same name in the .../cur/. folder.

My experience as a past Unix kernel developer suggests that a move operation should be a lower overhead operation than a copy and delete.
That may not be true in a newer style Unix journaling file system. My system is using ext4.

My most recent fsck, like so:
Code: Select all
akonadictl fsck 2> ~/akonadictl-fsck-14


Showed some good stuff, and some errors, like so:
Code: Select all
Looking for resources in the DB not matching a configured resource...
Looking for collections not belonging to a valid resource...
Checking collection tree consistency...
Looking for items not belonging to a valid collection...
Looking for item parts not belonging to a valid item...
Looking for item flags not belonging to a valid item...
Looking for overlapping external parts...
Verifying external parts...
Found 728 external files.
Found 728 external parts.
Found no unreferenced external files.
Checking size treshold changes...
Found 0 parts to be moved to external files
Found 0 parts to be moved to database
Looking for dirty objects...
Collection "Search" (id: 1) has no RID.
Collection "Last Search" (id: 154) has no RID.
Collection "akonadi_mbox_resource_1" (id: 204) has no RID.
Collection "Poker League" (id: 205) has no RID.
Found 4 collections without RID.
Item "893" has no RID.
Item "897" has no RID.

...

Item "77803" has no RID.
Item "77804" has no RID.
Item "77807" has no RID.
Found 436 items without RID.
Item "690" has RID and is dirty.
Item "772" has RID and is dirty.
Item "835" has RID and is dirty.
Item "841" has RID and is dirty.
Item "874" has RID and is dirty.
Item "885" has RID and is dirty.
Item "886" has RID and is dirty.
Item "891" has RID and is dirty.
Item "892" has RID and is dirty.
Found 9 dirty items.
Looking for rid-duplicates not matching the content mime-type of the parent collection
Checking Birthdays & Anniversaries

...

Checking sent-mail
Checking templates
Checking trash
Migrating parts to new cache hierarchy...
Consistency check done.


Are there any suggestions on how to clean up the collections and items without RID; and the dirty items. ???

I will provide more symptoms soon, by editing the post.

 
Reply to topic

Bookmarks



Who is online

Registered users: Baidu [Spider], Bing [Bot], dchmelik, Google [Bot], irvingarrietavazquez, Majestic-12 [Bot], MountainX, win8linux