Massive IMAP problem, multiple iPhones - constant spinning wheel

A friend has had problems using email on his iPhone since he got it, and now after a couple of months of no problems, mine has started doing the same thing.

The problem started for him on a UK 1.1.2 firmware iPhone with an IMAP account. If you start from scratch, manually setup an IMAP account, it will connect and get your messages. However later, you will find that the iPhone email program is constantly showing the spinning wheel at the top of the screen (showing activity), not the symbol at the bottom of the screen. Worse, the battery rapidly runs down (because it is doing constant data transfers), and worse new emails do not reliably get through. This happens whether you are using GPRS, EDGE, or WiFi (does not make a difference). This problem still happens with 1.1.3 firmware. There is so much data transfer happening (or trying to happen) that the phone actually gets quite warm.

This week after a couple of months of owning my own iPhone with 1.1.3 firmware has also started doing the same thing. My main IMAP account is on a totally different server, running a different server application to my friends. However it also seems to happen with GMail accounts (using IMAP).

I am currently at home and I can see my WiFi (AirPort Extreme) base-station showing lots of activity and I know that no other WiFi devices are active so it is purely the iPhone. Turning off the email account stops the problem (and I can then see the WiFi activity stop as well) but that is hardly a solution. Also setting it to manual polling for email helps but again is not a proper solution. It is so bad that sending emails is very difficult as well.

Even though at the iPhone end nothing seems to be coming through, one can see the iPhone as a connected user at the server end (I have access to the servers, obviously not for Gmail though).

My friend has swapped his phone four times at the Apple Store and still has the problem, and as I said mine has started as well. Turning off and on does not help, resetting network settings does not help.

Apple Mail on a Mac (running both Leopard and Tiger), and other IMAP clients have no problems with the same IMAP accounts (for both of us).

Other Internet access like Web, Stock Widget, Weather Widget, even the iTunes WiFi store work fine. It is just email that is broken.

PowerBook G4, Mac OS X (10.4.11)

Posted on Jan 30, 2008 4:26 PM

Reply
13 replies

Jan 31, 2008 3:53 AM in response to Allan Sampson

Allan Sampson wrote:
Have you also tried deleting and recreating the account to see if this makes any difference?


Oops, I thought I had included that information. Yes I have tried deleting and recreating the accounts, no it does not make a difference (except briefly).

My phone started working again late last night, but has gone bad this morning again.

...That's wierd. I just had my iPhone showing the email inbox, and it by itself went back to the homepage, almost as if it had 'unexpectedly quit'. Gone back in to the inbox and it is now spinning constantly again. Yep, I have been able to get this to happen twice more (appear to quit). No error messages though.

Watching carefully. If I start with no IMAP connection (by killing them at the server end), and then open the iPhone mail application, it appears to do an initial connection, which appears to complete (the spinning wheel goes away), and then it starts another connection immediately which then gets stuck for ever, draining the life out of the battery before your very eyes.

Jan 31, 2008 3:55 AM in response to Lawrence Finch

Lawrence Finch wrote:
This is almost too obvious to ask, but have you tried rebooting the phone? Hold the HOME and SLEEP buttons until the Apple logo appears (about 8 seconds).


Yes, tried that. However from what I read, if it normally shuts down (by holding the sleep button for several seconds and swiping across) then that is equivalent anyway. The forced method you describe is for when it is completely locked up, which is not the case here.

Feb 5, 2008 3:15 AM in response to John Lockwood

Further observations of this problem, suggest it is caused by poor Internet connections. If for example I am using WiFi to my Internet link which is already very busy downloading files, then the iPhone can fail to properly connect to the mail server and rather than dropping the attempt and retrying it seems to get stuck.

While I have WiFi access at both work and home, my friend has has EDGE at work and WiFi at home. However his WiFi at home seems to have been playing up since his MacBook Pro has had intermittent problems.

Killing the bad iPhone connection either at the server end, or by turning the iPhone off and on (rebooting) clears the bad connection and if the Internet link is then ok (not busy) it works normally.

Mail on a Mac does not have this problem, and Safari etc. on the iPhone do not have this problem, only Mail on the iPhone.

Feb 5, 2008 8:51 PM in response to John Lockwood

I'm having nearly same problem. Since the iPhone System update.. and the move to iMap... things were working fine for a bit. But in the last week, the mail program does not check my Gmail account correctly (shows as no new mail) even though I KNOW there's new mail. (I have new mail forwarded to me as an SMS message... so I get the SMS message.. but when I check gmail... no messages showing.) Once I check gMail on my Mac, I can see the messages. I don't see any way of going back to pop accounts? Happy to do so just to actually get my mail!

Message was edited by: Japster

Mar 21, 2008 5:54 PM in response to John Lockwood

I too have been having this problem with my two IMAP accounts being seemingly consistently connected to, thus running down the battery life. I have my mail settings set to manual check. I have two IMAP accounts. I never used to have this problem, but now it is pretty regular. The first time I go into Mail it starts checking for new mail and gets new mail. However, having found the new mail it then starts to connect and check again (the wheel symbol comes up at the top). If I then quit mail and come back an hour later, my battery is completely flat (not to mention the fact that the iphone is incredibly warm).

The only work-around I have found is to go into settings and switch 'airplane mode' on and off after I've finished with my e-mail. That seems to help it to quit the existing check of new mail. However, it's hardly a solution.

I first noticed this problem occuring in December and was hoping that one of the firmware updates might have fixed it. Sadly not. What I don't understand is why if you set auto-check to 'manual' it still starts checking for mail as soon as you go into it and repeatedly re-connects to check for mail (without finding any the second time). If only there were buttons for 'check for mail' and 'stop' then that would help things. You could then check for mail once, without it repeating itself and getting stuck. Also, you could stop it if you notice it repeating the check.

Mar 28, 2008 5:50 AM in response to Alastair Hazell

Alastair Hazell wrote:
I too have been having this problem with my two IMAP accounts being seemingly consistently connected to, thus running down the battery life. I have my mail settings set to manual check. I have two IMAP accounts. I never used to have this problem, but now it is pretty regular. The first time I go into Mail it starts checking for new mail and gets new mail. However, having found the new mail it then starts to connect and check again (the wheel symbol comes up at the top). If I then quit mail and come back an hour later, my battery is completely flat (not to mention the fact that the iphone is incredibly warm).

The only work-around I have found is to go into settings and switch 'airplane mode' on and off after I've finished with my e-mail. That seems to help it to quit the existing check of new mail. However, it's hardly a solution.

I first noticed this problem occuring in December and was hoping that one of the firmware updates might have fixed it. Sadly not. What I don't understand is why if you set auto-check to 'manual' it still starts checking for mail as soon as you go into it and repeatedly re-connects to check for mail (without finding any the second time). If only there were buttons for 'check for mail' and 'stop' then that would help things. You could then check for mail once, without it repeating itself and getting stuck. Also, you could stop it if you notice it repeating the check.


I also first noticed this problem in December sometime after upgrading to 1.1.3 (it still happens in 1.1.4). I used to have this problem also in a Google GMail account but since 1.1.4 that account now works fine (in IMAP mode). This maybe something Google fixed rather than Apple.

However my main work account (on a QuickMail Pro Server), and the bosses email account (obviously on the same server), and a friend who uses a Kerio Mail Server all exhibit this problem still in 1.1.4 firmware. It is so bad I have had to turn that email account off completely and not use it on the iPhone.

So currently I can use my personal GMail account, but not my work IMAP account.

May 12, 2008 7:03 AM in response to John Lockwood

The problem is that Mail app in iPhone is trying to download message headers via FETCH command and does not handle properly response from IMAP server which does not support partial download of email headers. It starts asking for the headers in the infinite loop which quickly drains out the battery

May 14, 2008 6:06 AM in response to Community User

Pdobry wrote:
The problem is that Mail app in iPhone is trying to download message headers via FETCH command and does not handle properly response from IMAP server which does not support partial download of email headers. It starts asking for the headers in the infinite loop which quickly drains out the battery


More recent testing by myself reveals it is getting stuck on some messages when doing the 'message peek' to get the summary of an email. It gets the subjects fine (as the first pass) but then gets stuck on some emails when doing the second pass to get the summary. Apple Mail on a Mac does not (as far as I am aware) do a message peek so does not have this problem.

The two different makes of server I have seen this problem with do support this message peek command in that at least some of the time it is working with the iPhone.

I was able to get a debug level log which shows entries like this

\[02/Apr/2008 23:56:17\]\[48699904\] {imaps} Peek FETCH executed on message 0000ba58 in folder ~xxxx@yyyy.zzz/INBOX
\[02/Apr/2008 23:56:17\]\[48699904\] {imaps} Sent 1 fetch responses
\[02/Apr/2008 23:56:18\]\[48699904\] {imaps} Command 293 UID FETCH 47704 BODY.PEEK\[2.HEADER\]<1177.15207>

\[02/Apr/2008 23:56:18\]\[48699904\] {imaps} Peek FETCH executed on message 0000ba58 in folder ~xxxx@yyyy.zzz/INBOX
\[02/Apr/2008 23:56:18\]\[48699904\] {imaps} Sent 1 fetch responses
\[02/Apr/2008 23:56:18\]\[48699904\] {imaps} Command 294 UID FETCH 47704 BODY.PEEK\[2.HEADER\]<1177.15207>

The above shows two repetitions but it keeps on (and on, and on). Other occasions show this does work for other messages. If I deliberately arrange to get the iPhone to connect to get the latest messages I can see it get stuck on a particular message, and then even if I turn it off and back on and reconnect it will get stuck on the same message. If repeated on a later date then the contents of the inbox will have changed and the message it gets stuck on will be different.

As it seems to be linked to specific messages it was not a surprise that when this is tried on a practically empty email account the problem does not occur.

This has happened with multiple different makes of mail server (well at least two), multiple email accounts, multiple users, and multiple different iPhones (one person had his swapped four times). It does not happen with 'ordinary' IMAP client software, only with the iPhone.

Even if one for arguments sake assumes the mail server is at fault and is sending the iPhone garbage, the iPhone should only try a single specific email a maximum number of times (for example five), and then give up. This would prevent it draining the battery so fast and trying to cook itself (by constantly running its transmitter).

May 16, 2008 3:28 AM in response to theplague

theplague wrote:
I have the exact same problem with IMAP and battery draining, and think this is by far the iPhone's biggest flaw!
It sounds it shouldn't be that hard to fix and it's a shame Apple haven't done something about it yet!


I agree this is by far the biggest problem with the iPhone. It is so bad that I and two other people I know of have all had to give up using it for accessing work email accounts. Furthermore as an IT Manager I have had to call a halt to any plans to offer them to employees as company phones.

It would help the cause if you could report this to Apple through as many routes as possible e.g. if you have a developer account you can use the official bug reporting process, otherwise if possible visit an Apple Store and speak to a genius.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Massive IMAP problem, multiple iPhones - constant spinning wheel

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.