Bug 151852 - "Unknown host" errors for multiple POP3 accounts on same server
Summary: "Unknown host" errors for multiple POP3 accounts on same server
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: pop3 (show other bugs)
Version: 1.10.0
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-04 16:50 UTC by Dave Treweeke
Modified: 2008-07-13 12:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Treweeke 2007-11-04 16:50:11 UTC
Version:           kmail 1.9.6 (using KDE KDE 3.5.7)
Installed from:    Fedora RPMs

I'm using kmail 1.9.6 on Fedora 7 (x86_64) configured to check 14 POP3 accounts.

I'm intermittently receiving "Unknown host" errors when I attempt to check for mail on these servers.

Since a number of the accounts reside on the same physical server, and say 5 connections are working and one isn't, then the host is definitely present and responding correctly. Rechecking the mail again against all accounts then works correctly 90% of the time. Checking for a third time seems to work 95%+ of the time without generating errors.

Pinging the host proves that the server is indeed responding.

I believe that this is unexpected behavior, and that when I click the "Check Mail In" button email should be received from all accounts.

There is nothing in the remote mail server log (server is running courier) to indicate any failures.

Connecting from other mail clients on this PC (Evolution for example) works as expected without generating any errors.

Changing the connection preferences in kcontrol has no effect and the errors are still generated in kmail.
Comment 1 Dave Treweeke 2007-11-04 17:04:28 UTC
I've noticed upon checking the logs on the remote server that the connection from kmail isn't establishing a login for the affected account(s) when they're generating the errors in kmail. I see logins for the other accounts on that remote server, but not for the login that's intermittently failing.
Comment 2 Maciej Pilichowski 2007-11-05 17:40:03 UTC
Could this be related to:
https://bugs.kde.org/show_bug.cgi?id=146314
?
Comment 3 Dave Treweeke 2007-11-05 18:59:15 UTC
Well, I've got 20Mbit broadband here so the connection is unlikely to be congested enough to cause kmail to time-out. It is possible however that there is a concurrency issue that might be solved by restricting kmail to only connect to a maximum of n connections at once rather than attempting to connect to them all simultaneously. I did try setting a "pre command" of sleep 1, but that just got run right before all of the connections fired off - I was kind of hoping that I could set a pre-command for each account, but it seems that the all of the pre-commands are run right at the start of a manual "check mail in". Is that how that particular functionality was designed to work?

Just as I write this I'm wondering if serially running the "check mail in" for a maximum of n concurrent multiple (when there are multiple) accounts might work better than connecting to all in parallel.

Manually checking the 14 (in my case) POP3 accounts one-by-one would be less than ideal.
Comment 4 Maciej Pilichowski 2007-11-05 19:16:16 UTC
Dave, would it possible to just check if calling (manually for the test) one-by-one account helps in your case? Maybe it is not the issue with traffic but KMail itself.
Comment 5 Dave Treweeke 2007-11-05 19:46:37 UTC
Hi Maciej, yes I can confirm that manually calling each account one-by-one works without any problems in my case.
Comment 6 Maciej Pilichowski 2007-11-05 20:38:16 UTC
Dave, thank you for testing -- so it seems that sequential access to accounts is really needed instead of parallel.

This would make this report a duplicate of the wish-report mentioned before.
Comment 7 Dave Treweeke 2007-11-05 23:22:59 UTC
Hi Maciej, are you using a 64-bit or 32-bit distro? Are you still using SuSE? I think that we might be able to rule out any distro-specific bits since I'm running Fedora 7 on an x86_64 and I think you're running on something different.

It does seem that the two problems we've experienced could well have the same underlying cause relating to blocking or concurrency issues within kmail.
Comment 8 Maciej Pilichowski 2007-11-06 08:39:29 UTC
That's right -- we use different distros and CPUs (I use suse, 32bit CPU).
Comment 9 Dave Treweeke 2007-11-06 23:15:24 UTC
So different distros, different archs but we're experiencing similar problems. I wonder how we get the devs to take a look at this?
Comment 10 Maciej Pilichowski 2007-11-07 11:06:53 UTC
> I wonder how we get the devs to take a look at this? 

We already did that :-)
Comment 11 Dave Treweeke 2007-11-07 19:37:31 UTC
I don't see anyone other than you an me commenting on this... I was kind of expecting that a dev might ask for some trace information or something like that, although if they know what the root cause and fix is then maybe they don't need any additional info.
Comment 12 Thomas McGuire 2007-11-12 13:09:24 UTC
Try to add the following to your kmailrc (in .kde/share/config) : 
[Network] 
MaxConnectionsPerHost=1 
 
Comment 13 Dave Treweeke 2007-11-12 19:37:07 UTC
I've modified my kmailrc as you identified above. I'll post back in a day or two after I've confirmed what effect the change has had. Initially things look more stable, but as with most of these types of problem it'll need a few days of use to confirm that this fix cures the issue.
Comment 14 Dave Treweeke 2007-11-15 23:23:52 UTC
I can confirm that modifying my kmailrc as outlined in comment #12 has resolved my issue.

I'm going to mark this bug as resolved since my specific issue has been solved (many thanks Thomas).
Comment 15 Thomas McGuire 2008-07-12 16:47:47 UTC
*** Bug 166366 has been marked as a duplicate of this bug. ***
Comment 16 Alex 2008-07-12 17:21:25 UTC
The solution mentioned in comment #12 didn't resolve the problem for me...
Comment 17 Thomas McGuire 2008-07-12 20:44:35 UTC
> The solution mentioned in comment #12 didn't resolve the problem for me... 
OK, reopening. You don't have DNS problems (i.e. websites taking a long time to show up in Konqueror), do you?
Comment 18 Alex 2008-07-12 23:04:51 UTC
Thanks for reopening. Well I always used Firefox so I didn't notice it but indeed I think I do have these problems: websites start loading but Konqueror stops after the first few objects (images). After a long break in which I only see a white page the site gets rendered without all the elements that haven't been loaded so far.

Sorry for not mentioning this but as I said I didn't use Konqueror.
How can I get rid of this?
Comment 19 Thomas McGuire 2008-07-13 12:35:11 UTC
> Thanks for reopening. Well I always used Firefox so I didn't notice it but indeed I think I do have these problems: websites start loading but Konqueror stops after the first few objects (images). After a long break in which I only see a white page the site gets rendered without all the elements that haven't been loaded so far.
OK, closing this bug again, your problem is bug 162600. As I mentioned there, a workaround is to change the DNS resolving of your system to bypass your router's DNS and go directly to the DNS servers of your ISP.