Bug 316107 - big regression: kmail IMAP connection and message display problems
Summary: big regression: kmail IMAP connection and message display problems
Status: CONFIRMED
Alias: None
Product: kmail2
Classification: Applications
Component: misc (show other bugs)
Version: 5.1.3
Platform: Other Linux
: NOR major with 202 votes (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-04 11:58 UTC by Marc Schiffbauer
Modified: 2017-06-28 09:16 UTC (History)
18 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
kmail error (50.64 KB, image/png)
2016-06-27 06:49 UTC, Sudhir Khanger
Details
Akonadi log file (deleted)
2017-06-15 11:14 UTC, Michal Hlavac
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marc Schiffbauer 2013-03-04 11:58:06 UTC
(I use current 4.10 branch of kdepim)

I guess somewhere between 4.10-beta and 4.10.0 some severe connection problems have been introduced for IMAP resources.
It seems existing imap connections will not be reused which leads to many open IMAP connections until the server refuses new connections.

I use kmail to read IMAP mail from a dovecot server which allows a max of 10 concurrent user+ip connections in default config.
I now often get a popup message showing a dovecot error message that this connection limit is exceeded.

Increasing this limit to 20 later 30 did not help!

I also noticed that since some weeks (three or so) kmail often takes a lot of time to show a message that has been selected in the message list. It takes around 10-20 seconds until a message is actually shown very often. I guess this is due to the connection problem also...

Today it was even worse: kmail again hit the connection limit (30 connections) and the imap resource has been set to Offline by kmail. Then I set it back online via "File->Work Offline, then File->work online which lead to a LOOP in which IMAP-resource messages were popping up as fast as possible telling me about the connection problem and my system was getting slower and slower....
It did not stop opening new popup messages and I had to manually kill -9 kmail to not let my whole system die...





Reproducible: Always

Steps to Reproduce:
please see above. AKonadi is version 1.9.0, kdepim is current 4.10 branch
Comment 1 Romain GUINOT 2013-04-17 09:06:00 UTC
I also have very similar issues on 4.10.2 / Fedora 18. Often during the day, An error is displayed eg "too many simultaneous connections". The only way to "fix" is to go into the GMail web UI, details, and click sign out of all sessions. Then restart Akonadi. 

I also have sometimes the long time to display messages that you report, although it can be "fixed" by the same workaround as above.

It's a major issue for me too, as i'm using KMail for my professional email.
Comment 2 Marc González Majoral 2013-06-04 21:24:37 UTC
(In reply to comment #1)
> It's a major issue for me too, as i'm using KMail for my professional email.

You are crazy.

I have a lot of issues with IMAP accounts too. At least one of the accounts _always_ gets a "Account name: killed" message and it's not possible to get email from it without restarting akonadi. The problem is after the restart, at least one of the accounts will have the same problem again. At home I have like 6-7 IMAP accounts. I tried with all kinds of configuration, always happens the same thing.
Comment 3 Romain GUINOT 2013-06-04 22:09:29 UTC
> You are crazy.

I don't think so, we are using Google Apps so there's always the option to fall back to GMail web UI. 

+ I don't have the issue anymore. can't tell which update fixed it, but it's no longer an issue, might have had it once or twice in the past month.... no big deal.
Comment 4 Marc Schiffbauer 2013-06-04 22:36:02 UTC
I am still having these issues everyday. And when it takes too long to display my mail or I am short of time (which happens quite too often) I login to my webmail (same server, same imap service) and read mail there because that is faster at least for one of my accounts (Which is configured to NOT cache offline copies)
Comment 5 John Purple 2013-06-07 01:04:45 UTC
I have a similar problem where the Imap server refuses to accept the login due to exceeding the number of allowable connections.

It happens frequently but not always. Only one of the four accounts I have configured is affected. If I close kmail and wait a while, often it will connect successfully. After a successful connection is made I have no further problems during that user session.

The "Server Info" for the affected account is 
IMAP4REV1
LITERAL+
SASL-IR
LOGIN-REFERRALS
ID
ENABLE
SORT
SORT=DISPLAY
THREAD=REFERENCES
THREAD=REFS
MULTIAPPEND
UNSELECT
IDLE
CHILDREN
NAMESPACE
UIDPLUS
LIST-EXTENDED
I18NLEVEL=1
CONDSTORE
QRESYNC
ESEARCH
ESORT
SEARCHRES
WITHIN
CONTEXT=SEARCH
LIST-STATUS
QUOTA
Comment 6 Marc Schiffbauer 2013-07-26 08:12:48 UTC
The problem with too many (dead) concurrent connections seems to be gone or not happening as often as it used to, but the message display problems still exists in current 4.11 branch.

Any news on this?

Maybe these bugs *may* be related (please do not mark as duplicate): bug #301178 and bug #311184
Comment 7 Marc Schiffbauer 2013-07-30 08:48:17 UTC
Bump: This problem still exists in current 4.11 branch
Comment 8 Sven Eden 2013-08-14 13:24:01 UTC
*some* of the symptoms, although titled differently, are discussed/presented in Bug 283334

This issue make kmail almost unusable. Our Webinterface is an outdated "horde mail" installation. :(
Comment 9 Sven Eden 2013-08-19 13:21:02 UTC
I have tried with akonadi compiled from git://anongit.kde.org/akonadi , but IMAP stays switching to persistent offline mode after a while.
Comment 10 thierry gicquel 2013-08-21 08:08:02 UTC
Hello all,

i have also this kind of problem with imap google ;

I well see folders in the left of screen but it's impssible to open messages ...the right of screen is completely empty....but i have no error message.
Comment 11 Sven Eden 2013-08-22 09:35:22 UTC
Hello again, 
I have updated to KDE-4.11.0 and Akonadi-1.10.2 - the same issues but with some slight changes:
- Although the IMAP account died ("<account> killed" notification received), the Mails that got sync'd last are correctly buffered and can be read.
- Now when I click on "Click _here_ to go online", it takes until the next auto-sync (5 minutes interval) before the next "killed" message comes. (Was immediatly before.)
- formerly, when I started akonadi using akonadictl I had a couple of lines of not-fetched items and then  no more output. Now this line comes only a few times but then is repeated over an over again once per second.
The output is:

--------
sed@sed-notebook ~ $ akonadictl start
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
search paths:  ("/home/sed/sys/bin", "/usr/local/bin", "/usr/bin", "/bin", "/opt/bin", "/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.3", "/opt/nvidia-cg-toolkit/bin", "/usr/lib64/subversion/bin", "/usr/games/bin", "/opt/vmware/bin", "/var/qmail/bin", "/usr/sbin", "/usr/local/sbin", "/usr/local/libexec", "/usr/libexec", "/opt/mysql/libexec", "/opt/local/lib/mysql5/bin", "/opt/mysql/sbin") 
QSqlDatabasePrivate::removeDatabase: connection 'initConnection' is still in use, all queries will cease to work.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
search paths:  ("/home/sed/sys/bin", "/usr/local/bin", "/usr/bin", "/bin", "/opt/bin", "/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.3", "/opt/nvidia-cg-toolkit/bin", "/usr/lib64/subversion/bin", "/usr/games/bin", "/opt/vmware/bin", "/var/qmail/bin") 
search paths:  ("/usr/lib/kde4/plugins/", "/usr/lib/qt4/plugins/", "/usr/lib64/qt4/plugins", "/usr/bin", "/usr/lib64/kde4/plugins", "/home/sed/.kde4/lib64/kde4/", "/usr/lib64/kde4/") 
search paths:  ("/usr/lib/kde4/plugins/", "/usr/lib/qt4/plugins/", "/usr/lib64/qt4/plugins", "/usr/bin", "/usr/lib64/kde4/plugins", "/home/sed/.kde4/lib64/kde4/", "/usr/lib64/kde4/") 
search paths:  ("/usr/lib/kde4/plugins/", "/usr/lib/qt4/plugins/", "/usr/lib64/qt4/plugins", "/usr/bin", "/usr/lib64/kde4/plugins", "/home/sed/.kde4/lib64/kde4/", "/usr/lib64/kde4/") 
 mMonitor true 
 mMonitor true 
akonadi_nepomuk_feeder(26327) FeederPluginloader::feederPluginsForMimeType: No feeder for type  "text/calendar"  found 
akonadi_nepomuk_feeder(26327) ItemQueue::fetchJobResult: Not all items were fetched:  0 100 
(...)
akonadi_nepomuk_feeder(26327) ItemQueue::fetchJobResult: Not all items were fetched:  0 100 
--------

- akonadictl fsck and vacuum don't seem to do anything anymore. (Or maybe they just haven't got anything to do.)

- akonadictl stop now gives a message (the first) I do not understand. The mentioned folder is there and valid:

--------
sed@sed-notebook ~ $ AkonadiAgentServer(26321)/kio (KDirWatch) KDirWatchPrivate::removeEntry: doesn't know "/home/sed/Mail" 
AkonadiAgentServer(26321)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
akonadi_pop3_resource_0(26329)/akonadiresource (pop3) SettingsHelper::~SettingsHelper: Settings(0xd378f0) 
Application '/usr/bin/akonadi_kabc_resource' exited normally...
Application '/usr/bin/akonadi_pop3_resource' exited normally...
Application '/usr/bin/akonadi_sendlater_agent' exited normally...
Application '/usr/bin/akonadi_agent_launcher' exited normally...
Application '/usr/bin/akonadi_maildispatcher_agent' exited normally...
Application '/usr/bin/akonadi_davgroupware_resource' exited normally...
Application '/usr/bin/akonadi_agent_launcher' exited normally...
Application '/usr/bin/akonadi_imap_resource' exited normally...
Application '/usr/bin/akonadi_agent_launcher' exited normally...
Application '/usr/bin/akonadi_mailfilter_agent' exited normally...
Application '/usr/bin/akonadi_archivemail_agent' exited normally...
Application '/usr/bin/akonadi_vcarddir_resource' exited normally...
Application '/usr/bin/akonadi_newmailnotifier_agent' exited normally...
Application '/usr/bin/akonadi_nepomuk_feeder' exited normally...
Application 'akonadiserver' exited normally...
--------

However, after doing

$ akonadictl start
$ akonadictl fsck
$ akonadictl vacuum
$ akonadictl restart

The IMAP account works again until, yes until, a message is received and moved into a different folder by the auto filter of kmail.

========

*sigh* I will go and move _ALL_ my e-mails (luckily only ~3,000) into my inbox and delete the filters and the folders. Let's see whether the problem persists if only one inbox folder is left.
Comment 12 Daniel Vrátil 2013-08-22 10:36:29 UTC
The KDirWatchPrivate::RemoveEntry is unrelated (it's a debug output from kdelibs)

"akonadictl fsck" command will return immediately, but the operation is executed on the Akonadi Server and will take some time to finish (and there should be some debug output from the server).

The "killed" error probably means that the resource has crashed. After starting Akonadi. try attaching GDB to the akonadi_imap_resource process and see whether you can get any backtrace when it crashes (if it crashes)
Comment 13 Sven Eden 2013-08-27 12:10:44 UTC
(In reply to comment #12)
> The "killed" error probably means that the resource has crashed. After
> starting Akonadi. try attaching GDB to the akonadi_imap_resource process and
> see whether you can get any backtrace when it crashes (if it crashes)

I am sorry, but after removing all filters and moving all e-mails to the inbox the resource no longer crashes. I suspect that the moving was too fast, or whatever, hence I've never seen anything suspicious in neither the filter log nor the akonadi console debugging output.

I have tried to add another folder and set a filter to send messages from my private mail adress there, but single messages arriving don't seem top be a problem.

The resource only crashed when multiple messages arrived.

However, I want at least the e-mails from my coworkers to be sorted out of my inbox, so I'll re-create the corresponding folders and filter rules. I just do not know when I am done with it.
Comment 14 Martin van Es 2013-08-28 18:23:26 UTC
For me, kmail/akonadi is extremely unstable since 4.11. My (Zimbra server) IMAP process dies "unexpectedly" and "Cannot connect to agent instance with identifier 'akonadi_imap_resource_0' are daily happenings.
Comment 15 Martin van Es 2013-08-31 09:09:32 UTC
Akonadi/KMail is so broken in 4.11 that I would advise not to upgrade and to globally retract the update. I can not rely on KMail to show me current mail anymore, especially after standby. This has already caused some missed appointments for by now. So, webmail interface then for a while...

I know it doesn't help to whine, but I thought it's in everyone's interest to know the current state of affairs. Also, if there's anything I can do I'd be happy to help to get 4.10 functionality back again.
Comment 16 Alexander Diewald 2013-09-01 09:11:00 UTC
*** This bug has been confirmed by popular vote. ***
Comment 17 Martin van Es 2013-09-01 15:51:55 UTC
My problems seem to be completely fixed by changing the IMAP connection parameters to port 143/STARTTLS (was 993/SSL/TLS). This seems to be related to openssl/Qt/amd64 problems I found by googling some more.
Comment 18 Alexander Diewald 2013-09-02 18:47:29 UTC
Unfortunately, I cannot second the previous statement. My IMAP-box was set to use StartTLS when I encountered this bug as well. This does not seem to be the issue for me, but I'm glad it's working for you now, Martin :)
Note: I'm connecting to a MS Exchange resource through IMAP, not to a Zimbra server.
Comment 19 Martin van Es 2013-09-03 07:35:38 UTC
There might be a relation to the fact that my Zimbra server serves a self-signed certificate (accepted forever)? I have a gmail custom domain account that is happily working on 993/SSL/TLS which I suspect to serve a decent commercial certificate.
Comment 20 John Andersen 2013-09-09 20:38:35 UTC
My 4.11.1 akonadi_imap_resource starts spamming our in-house mail server (Cyrus Imap) anywhere for 5 minutes to 30 minutes after KDE-Kontact (Kmail) is started.  It will persist after Kontact is shut down.  It *only* uses 15% cpu, but floods the imap server with messages like this:
Sep  9 13:17:09 screenio imaps[16405]: starttls: TLSv1 with cipher AES256-SHA (256/256 bits new) no authentication
Sep  9 13:17:09 screenio imaps[16408]: accepted connection
Sep  9 13:17:09 screenio imaps[16408]: mydelete: starting txn 2150652719
Sep  9 13:17:09 screenio imaps[16408]: mydelete: committing txn 2150652719
Sep  9 13:17:09 screenio imaps[16408]: mystore: starting txn 2150652720
Sep  9 13:17:09 screenio imaps[16408]: mystore: committing txn 2150652720
Sep  9 13:17:09 screenio imaps[16408]: starttls: TLSv1 with cipher AES256-SHA (256/256 bits new) no authentication
Sep  9 13:17:09 screenio imaps[16403]: accepted connection
Sep  9 13:17:09 screenio imaps[16403]: mydelete: starting txn 2150652721
Sep  9 13:17:09 screenio imaps[16403]: mydelete: committing txn 2150652721
Sep  9 13:17:09 screenio imaps[16403]: mystore: starting txn 2150652722
Sep  9 13:17:09 screenio imaps[16403]: mystore: committing txn 2150652722
Sep  9 13:17:09 screenio imaps[16403]: starttls: TLSv1 with cipher AES256-SHA (256/256 bits new) no authentication
Sep  9 13:17:09 screenio imaps[16408]: accepted connection
Sep  9 13:17:09 screenio imaps[16408]: mydelete: starting txn 2150652723
Sep  9 13:17:09 screenio imaps[16408]: mydelete: committing txn 2150652723
Sep  9 13:17:09 screenio imaps[16408]: mystore: starting txn 2150652724
Sep  9 13:17:09 screenio imaps[16408]: mystore: committing txn 2150652724
Sep  9 13:17:09 screenio imaps[16408]: starttls: TLSv1 with cipher AES256-SHA (256/256 bits new) no authentication
Sep  9 13:17:09 screenio imaps[16403]: accepted connection
Sep  9 13:17:10 screenio imaps[16403]: mydelete: starting txn 2150652725
Sep  9 13:17:10 screenio imaps[16403]: mydelete: committing txn 2150652725
Sep  9 13:17:10 screenio imaps[16403]: mystore: starting txn 2150652726
Sep  9 13:17:10 screenio imaps[16403]: mystore: committing txn 2150652726

This will persist for hours, filling the logs on the server.  Its a one station DOS attack.
It makes Kmail unusable. 

If I kill the akonadi_imap_resource  task, Kmail keeps operating normally, I see server side message suggesting my Kmail logged in again


Sep  9 13:26:18 screenio imaps[16547]: starttls: TLSv1 with cipher AES256-SHA (256/256 bits new) no authentication
Sep  9 13:26:18 screenio imaps[16547]: login: [192.168.2.232] jsa PLAIN+TLS User logged in
Sep  9 13:26:18 screenio imaps[16547]: seen_db: user jsa opened /var/lib/imap/user/j/jsa.seen
Sep  9 13:26:18 screenio imaps[16547]: open: user jsa opened INBOX
Sep  9 13:26:18 screenio imaps[16547]: open: user jsa opened INBOX
Sep  9 13:26:55 screenio master[3246]: process 15854 exited, status 0
Sep  9 13:26:55 screenio master[3246]: process 16548 exited, status 0
Sep  9 13:26:55 screenio master[16552]: about to exec /usr/lib/cyrus/bin/imapd

And it will work fine for a while.  A new aknodi_imap_resource will spawn, and after 
another period of inactivity, it till will start dossing the imap server again. 

This has been going on for several KDE releases now.  Its time to fix this guys!!
Comment 21 John Andersen 2013-09-10 00:08:53 UTC
(In reply to comment #5)
> I have a similar problem where the Imap server refuses to accept the login
> due to exceeding the number of allowable connections.

I found that going to system settings -or- configure desktop, which ever your installation calls it,
then selecting personal information item from the "common appearances and behavior group"
that each of my mail configurations was replicated, some more than 4 times.  

This makes for too many akonadi_imap resources, and these things launch by default, and connect even if KDE PIM is not running, and they each chew up at a very minimum 1 socket, making it easy to see why you are exceeding the maximum allowable connections.  Especially if you have one or two mobile devices, as well as a home and work computer all watching that imap account.

I just delete each of them, then set up kmail again.  Now I will see if the breed like rabbits when I turn my back.
Comment 22 Alexander Diewald 2013-09-11 18:58:00 UTC
It is working for me now after updating to 4.11.1 and deleting all akonadi-related files in my home directory. Although I have done this step when updating to 4.11.0 as well it seems to have fixed the issue for me at least and its running fine for a couple of days now. Can anyone confirm this? (BTW, I have seen no duplicates of resources in my configuration/database)
Nevertheless, I had to delete my nepomuk index as well after this step because it gone crazy with mail indexing, then (utilizing a quad core i7 with more than 50%).
Comment 23 John Andersen 2013-09-11 19:19:18 UTC
(In reply to comment #22)
> It is working for me now after updating to 4.11.1 and deleting all
> akonadi-related files in my home directory. Although I have done this step
> when updating to 4.11.0 as well it seems to have fixed the issue for me at
> least and its running fine for a couple of days now. Can anyone confirm
> this? (BTW, I have seen no duplicates of resources in my
> configuration/database)
> Nevertheless, I had to delete my nepomuk index as well after this step
> because it gone crazy with mail indexing, then (utilizing a quad core i7
> with more than 50%).

I can confirm that it was STILL BROKEN in 4.11.1.  See post 20 above.

akonadi_imap_resource would start to spam the imap server (some times up to 30 minutes AFTER I closed kmail.

By removing duplicates Resources as mentioned in +21, AND setting the resource to be closed when Kmail stops (See: Kmail Settings, Accounts, Retrieval Options button on each account.)

How I got duplicates resources I don't know.  Duplicates have not re-appeared.  This machine was upgraded from one release (opensuse) to another, skipping a couple of releases.

With these settings I have not seen akonadi_imap_resource pounding on the imap server, and these akonadi_imap_resource instances never take more than 2%CPU.
Comment 24 Joerg Mertin 2013-10-17 16:51:51 UTC
Problem still exists on KDE 4.11.2 - I don't really see it on my Workstation as it´s amazingly fast, but my server is at 100% CPU utilization, and the logfiles are filling up fast.

FYI - I had wiped all akonadi configuration files before reconfiguring/testing kontact/kmail 2 days ago.

Oct 17 18:37:09 stargate cyrus/imaps[9490]: starttls: TLSv1 with cipher AES256-SHA (256/256 bits new) no authentication
Oct 17 18:37:09 stargate cyrus/imaps[9490]: accepted connection
Oct 17 18:37:09 stargate cyrus/imaps[9490]: starttls: TLSv1 with cipher AES256-SHA (256/256 bits new) no authentication
Oct 17 18:37:09 stargate cyrus/imaps[9490]: accepted connection
Oct 17 18:37:09 stargate cyrus/imaps[9490]: starttls: TLSv1 with cipher AES256-SHA (256/256 bits new) no authentication
Oct 17 18:37:09 stargate cyrus/imaps[9490]: accepted connection
Oct 17 18:37:09 stargate cyrus/imaps[9490]: starttls: TLSv1 with cipher AES256-SHA (256/256 bits new) no authentication
Oct 17 18:37:09 stargate cyrus/imaps[9491]: executed
Oct 17 18:37:09 stargate cyrus/imaps[9491]: accepted connection
Comment 25 John Andersen 2013-10-17 17:31:42 UTC
(In reply to comment #24)
> Problem still exists on KDE 4.11.2 - I don't really see it on my Workstation
> as it´s amazingly fast, but my server is at 100% CPU utilization, and the
> logfiles are filling up fast.
> 
> FYI - I had wiped all akonadi configuration files before
> reconfiguring/testing kontact/kmail 2 days ago.
> 
> Oct 17 18:37:09 stargate cyrus/imaps[9490]: starttls: TLSv1 with cipher
> AES256-SHA (256/256 bits new) no authentication
> Oct 17 18:37:09 stargate cyrus/imaps[9490]: accepted connection
> Oct 17 18:37:09 stargate cyrus/imaps[9490]: starttls: TLSv1 with cipher

@Joerg:

See also: https://bugs.kde.org/show_bug.cgi?id=316840

I believe that bug report may also address the problem that you (and I) are seeing.
This bug should maybe be merged with that one.
If you have a multi-core processor, this bug will never impact your workstation but it can impose a high load on the mail server as you observed.
Comment 26 Joerg Mertin 2013-10-18 11:33:28 UTC
@John
Thx. Already had checked it out. Both seem to be linked, however there is no fix available as of now.
Comment 27 Martin Steigerwald 2015-04-12 11:26:08 UTC
Dear Marc, thank you for reporting the original issue. Also thanks to everyone who confirmed it. I see some comments where I do not see a direct relation to this original bug report, thus I am just treating this as the original issue of opening too many connections to the IMAP server.

With KDEPIM 4.14 and Akonadi 1.13 compiled from current 4.14 and 1.13 branches I cannot reproduce this issue. Also with 4.14.2 and 1.13 debian packaged I didn´t see this.

I just used my test IMAP Dovecot account with 37000 messages spread over several folders and clicked around it like mad, yet i only see:

merkaba:~> netstat -tanp | grep imap
tcp        0      0 10.0.0.88:32830         194.150.191.11:143      VERBUNDEN   1644/akonadi_imap_r
tcp        0      0 10.0.0.88:33342         194.150.191.11:143      VERBUNDEN   1644/akonadi_imap_r

Also client port numbers appear to be stable, so its not opening a new connection every time. You can verify this with:

watch -n1 "netstat -tanp | grep imap"

Also the response is almost instant. At work with Exchange IMAP I do get delays, but well, I attribute them to crappy Exchange IMAP implementation.

I am using a self-signed certificate for mail still.

So, can you still reproduce this with KMail from KDEPIM 4.14 and Akonadi 1.13? If so, please share the details of your setup. Please also note whether are you using more than one instance of KMail on different machines accessing the same account, if so, please also see bug #322199 referenced below.

If you did report anything else to this bug report that doesn´t relate to using too many IMAP connections, please consider opening a new separate report about it.

Also I suggest to separate any longer delays in displaying mails from the IMAP connection issue unless you are sure they are directly related. So if you are still experiencing long delays between clicking on a mail and seeing its contains, yet do not see many connections open, please report this as a separate issue.

Also note related bugs:

Bug 316840 - imap resource starts crazy connect / disconnect cycle to mail server
which appears to be fixed.

Bug 322199 - akonadi_imap spams perdition log when two clients are active and gets restarted all the time
Which I didn´t try to reproduce again anymore but someone still reproduced with 4.14.2

Thank you, Martin
Comment 28 Martin Steigerwald 2015-04-12 11:50:46 UTC
Setting to waiting for information after I received bugzilla rights to do that.
Comment 29 Sudhir Khanger 2016-04-23 10:15:04 UTC
What is the information needed Martin?
Comment 30 Martin Steigerwald 2016-04-23 10:32:51 UTC
Hello Sudhir, read comment #27. I specified what information I ask for there. Thanks, Martin
Comment 31 Martin Steigerwald 2016-04-23 10:36:46 UTC
Additionally for "So, can you still reproduce this with KMail from KDEPIM 4.14 and Akonadi 1.13?" I´d update this to KDEPIM + Akonadi 15.12. Please test with that version as KDEPIM 4 and Akonadi 1.13 are not supported by upstream anymore. If you do have a distro that still uses it, feel free to use to report it there but its maybe unlikely that it would be fixed there still for Qt4 based Akonadi + KDEPIM, so it may be better to wait till you can test with at least KDEPIM + Akonadi 15.12. If you can even rather test with 16.04. So or so, I personally think the issue has been fixed meanwhile. I didn´t see it in ages.
Comment 32 Sudhir Khanger 2016-05-27 13:29:27 UTC
Hi Martin,

I will have to wait 2 more months to get the upstream supported KDEPIM+Akonadi (15.12+) version. I will report back if I have any issues with them.

I am curious if you could shed some light on it. Zoho tells me KMail is making more than 20 simultaneous connections to their server. I am watching the imap traffic using the command you provided `watch -n1 "netstat -tanp | grep imap`. I only see the following 4 lines. That's the maximum I have seen

tcp        0      0 192.168.1.33:45940      155.97.137.30:993       ESTABLISHED 2117/akonadi_imap_r
tcp        0      0 192.168.1.33:38574      165.254.168.191:993     ESTABLISHED 2114/akonadi_imap_r
tcp        0      0 192.168.1.33:44000      155.97.137.30:993       ESTABLISHED 2117/akonadi_imap_r
tcp        0     69 192.168.1.33:40884      165.254.168.191:993     ESTABLISHED 2114/akonadi_imap_r

Looking up these IP addresses I see two of these are from a working email server. No problem there. The rest two are connecting to Zoho servers. I don't see 20 entries. Will I see 20 entries if KMail were making 20 simultaneous connections?
Comment 33 Martin Steigerwald 2016-05-27 13:39:58 UTC
Sudhir, I have no idea what Zoho displays there. I only know zoho.com as a source for spam that reaches my mailbox so far. I suggest you talk back with Zoho support on this one.  Let us know is KDEPIM/Akonadi 15.12 or even better 16.04 resolves the issue for you.
Comment 34 Sudhir Khanger 2016-06-27 06:49:11 UTC
Created attachment 99712 [details]
kmail error

I can confirm that the problem has not been resolved in KMail 5.1.3.
Comment 35 Martin Steigerwald 2016-06-27 13:09:39 UTC
Did you make sure you also use KMail 5.1.3 with recent Akonadi version? (It shouldn´t work with any Qt4 based Akonadi, but well, better make sure)
Comment 36 Sudhir Khanger 2016-06-27 14:08:21 UTC
Seem like I have the right packages.

$ rpm -qa | grep akonadi
kf5-akonadi-mime-15.12.3-3.fc24.x86_64
akonadi-1.13.0-102.fc24.x86_64
kf5-akonadi-contact-15.12.3-3.fc24.x86_64
kf5-akonadi-server-mysql-15.12.3-4.fc24.x86_64
kf5-akonadi-notes-15.12.3-3.fc24.x86_64
akonadiconsole-15.12.3-1.fc24.x86_64
kdepimlibs-akonadi-4.14.10-13.fc24.x86_64
kf5-akonadi-server-15.12.3-4.fc24.x86_64
kf5-akonadi-calendar-15.12.3-1.fc24.x86_64
kf5-akonadi-15.12.3-3.fc24.x86_64
kf5-akonadi-search-15.12.3-1.fc24.x86_64
$ rpm -qa | grep kmail
kmail-libs-15.12.3-1.fc24.x86_64
kf5-kmailtransport-15.12.3-1.fc24.x86_64
kmail-15.12.3-1.fc24.x86_64
Comment 37 Michal Hlavac 2017-06-15 11:09:17 UTC
I have same problem with 2 gmail accounts. Another problem with gmail accounts is that gmail resources everytime freeze when wake up from suspend to RAM. I don't know if this is related to this problem. Workaround is to restart akonadi.
Comment 38 Michal Hlavac 2017-06-15 11:14:08 UTC
Created attachment 106107 [details]
Akonadi log file
Comment 39 Michal Hlavac 2017-06-15 11:17:34 UTC
Sorry, wrong window! Is it possible to delete my comments and attachment? thanks
Comment 40 Nicolás Alvarez 2017-06-27 17:42:43 UTC
The content of attachment 106107 [details] has been deleted for the following reason:

Accidentally uploaded, has private tokens
Comment 41 Nicolás Alvarez 2017-06-27 17:47:05 UTC
I deleted the attachment, but you should probably go to your Google Account and revoke access to KMail, so that the access token you accidentally posted stops working.
Comment 42 Michal Hlavac 2017-06-28 09:16:28 UTC
Thanks, I already did it right after upload.