AquaMail Forum

English - Android => How do I... => Topic started by: MRAndroid on May 09, 2013, 11:18:16 am

Title: Too many IMAP Push connections
Post by: MRAndroid on May 09, 2013, 11:18:16 am
I have set up my IMAP account and have around 20 folders that I use.  I set each one as an IMAP push connection as I wanted all folders to synchronize as I move mail between folders.  Is this the incorrect way to do this as I have a constant error notification stating too many IMAP Push connections.

If this is the incorrect way to set this up, what is the correct way please?  I use three e-mail clients to access this IMAP account.  One at work, one at home and my mobile.  I would like what ever mails I  change or move on one to be reflected on the others.
Title: Re: Too many IMAP Push connections
Post by: Nedal0 on May 10, 2013, 04:05:34 am
If I understand what you mean, I think you should find the settings you are looking for under the "options and folders" under each individual account settings page, and the then look for the "folder" option.

By default for example on Gmail, it is not set to synch with IMAP push so you will have to change it by selecting the "spanner" symbol next to the folder names.

Hopefully I didn' t misunderstand your issue
Title: Re: Too many IMAP Push connections
Post by: Kostya Vasilyev on May 13, 2013, 03:09:01 am
20 folders in push mode would burn the battery in no time.

In addition, Gmail has a limit of 10 simultaneous server connections per account.

So, turn off push for most of them, and just set them to "Sync as incoming", so they're included in scheduled mail checks.

Maybe configure 1-3 most important ones with push.

The rest you can navigate to using "More folders..." (in message list / account list) and the app will show up to 3 most recently used ones there too.
Title: Re: Too many IMAP Push connections
Post by: spider623 on May 09, 2014, 04:52:02 pm
20 folders in push mode would burn the battery in no time.

In addition, Gmail has a limit of 10 simultaneous server connections per account.

So, turn off push for most of them, and just set them to "Sync as incoming", so they're included in scheduled mail checks.

Maybe configure 1-3 most important ones with push.

The rest you can navigate to using "More folders..." (in message list / account list) and the app will show up to 3 most recently used ones there too.

The battery is no issue for a device I use and I need more than 30 folders as push on that, can you please add an option to alter or even disable the limit?
The device is plugged 24/7 anw and works as a TV-box

Sent from my Nexus 4 using Tapatalk
Title: Re: Too many IMAP Push connections
Post by: Kostya Vasilyev on May 11, 2014, 01:55:03 am
This is a server side limitation.

Enforced by the server, not allowing login on any connections beyond the set limit.

Feel free to bring this up with Google support and engineers who work on Gmail's IMAP server.

( maybe you could also ask them to fix their implementation of IMAP IDLE, incomplete since 2007 )

Joking aside, I don't have any leverage with Google, maybe you feel differently...
Title: Re: Too many IMAP Push connections
Post by: Yury on May 11, 2014, 03:13:40 am
This is actually a pretty common complaint folks have with gmail. We use Google business stuff and sometimes a desktop client plus a mobile client with several pushed labels exhaust the connection limit. Happens randomly on a desktop side as well as mobile.

Basically gmail sucks when pushing multiple labels. Message read status won't sync in some cases, connection limit issues. I moved from gmail to fastmail.fm for my personal emailing needs and everything works fine. And its faster too. Multiple folders via push is not an issue at all.
Title: Re: Too many IMAP Push connections
Post by: spider623 on May 13, 2014, 09:28:44 am
My problem was not with Google but I will talk with the administrator of the server to see if he can increase the limit

Sent from my Nexus 4 using Tapatalk

Title: Re: Too many IMAP Push connections
Post by: Kostya Vasilyev on May 15, 2014, 02:35:41 am
+1 for Fastmail

+10000 for Google's incomplete IMAP IDLE implementation.

Known since 2007, no plans to fix, but their Android app is not affected (since it doesn't use IMAP). Nice.
Title: Re: Too many IMAP Push connections
Post by: Tronic on October 26, 2014, 07:07:32 pm
Hello,

I am testing Aqua Mail since a few days, because I'm disappointed about the development of K9 and forks. But I ran into problems with "Too many IMAP Push connections" and battery drain!

In addition, Gmail has a limit of 10 simultaneous server connections per account.

So, turn off push for most of them, and just set them to "Sync as incoming", so they're included in scheduled mail checks.
Maybe Google has a limitation on their server, but in that case the server should be the limit and not the App!
I have a much higher limit on my on mail server and accessing it the same time with 2 Phone, 1 Tablet and up to 3 PCs without any problem at the server or the clients.
I used K9, Kaiten, K-@ Mail and other clients with a limit up to 25 push connections per account! Whike testing more Apps parallel I had some limitations on the server and increased it. No problem on the server or clients / Apps.

So, why not let the user decide how much push connections he will use, if the server is not the limit?

20 folders in push mode would burn the battery in no time.
I use a lot of folders and sieve filters on my mail server to sort mails into folders to not mess up my INBOX.For this use case I need push notifications and use them since years on my phones. I know that it need some battery, but not more I can life with ;-)

So, the problem with burning down the battery is not using push, I think the problem is the way you implemented push!
I think you keep the App alive (with notification icon) to get push working and that`s the problem.

After reboot of my tablet I have the following stats (7,5h operating):
5h 22m - AquaMail WakeLock (with 25 push connections)
2m 30s - K-@ Mail WakeLock (with at least 50 push connections)

18,2% battery by Aqua Mail and just 2,4% battery by K-@ Mail!

So, what's the problem? The amount of push connections or the way of implementation?

Maybe you should do some investigation in push connection implementation. The App is very nice, has very much configuration options (just a few missing) ans seems like have a lot security options!
But like it works at the moment it's really killing the battery and not usable for me  and my use case!
Title: Re: Too many IMAP Push connections
Post by: Kostya Vasilyev on October 29, 2014, 12:50:52 am
>>> Maybe Google has a limitation on their server, but in that case the server should be the limit and not the App

It is on the server.

And it's not a "maybe":

https://support.google.com/mail/answer/97150?hl=en

>>> K9, Kaiten, K-@ Mail and other clients with a limit up to 25 push connections per account

They can allow 100 or 1000 or 10,000 all they want.

The Gmail IMAP server won't allow more than 15 per account, counting all apps, on all devices, desktop and mobile, except the Gmail app.

>>> 2m 30s - K-@ Mail WakeLock (with at least 50 push connections)

Did you actually have 20 folders in push mode in K-@?

The number is so low, it makes me wonder if all those folders really did work in push mode (in this mail app).
Title: Re: Too many IMAP Push connections
Post by: Tronic on November 03, 2014, 06:25:54 pm
And it's not a "maybe":
(why I'm not allowed to post external links - even in a quote ???)
...
The Gmail IMAP server won't allow more than 15 per account, counting all apps, on all devices, desktop and mobile, except the Gmail app.
I wrote "maybe", because it doesn't matter for me. I use Gmail only for some stuff related to Android (like Play Store and Apps).

I use my own mailserver and can set to limit of parallel connections for my IMAP server to a reange I want. So I should to be able to set a limit on the client (e. g. Thunderbird, K-@ Mail, Aqua Mail or whatever) that works with the server!
If I set the limit in my client App to 50 and the server has a limit 0 15, then the server wins and the limit will be 15. But if the server has a limit of 200 then I can use 50 connections (and 50 push folders)!

>>> 2m 30s - K-@ Mail WakeLock (with at least 50 push connections)

Did you actually have 20 folders in push mode in K-@?

The number is so low, it makes me wonder if all those folders really did work in push mode (in this mail app).
I have counted it now and I have 37 push folders (= push connections) in 5 accounts and it works. I get a notification on my Android devices when a new mail arrives in a few seconds (IMAP idle with dovecot) - even if mail is sorted into sub folder by a sieve rule.

I will have an eye on the battery usage this week, because I have holidays ;-)
I see days where the battery drain of Aqua and K-@ were in the same range. I will give you feedback about that.
Title: Re: Too many IMAP Push connections
Post by: Kostya Vasilyev on November 04, 2014, 01:07:09 am
I have not seen the source code of K@Mail -- it's not available -- but the IMAP push code in K9 Mail is missing one very important piece.

You can cripple Aqua's push code to be the same as K9's -- and it should lower battery consumption somewhat -- in settings -> network -> push mail keep-alive -> none.

One other thing to keep in mind -- Dovecot sends dummy "keep-alive" packets as well, and they will wake up the device.

https://peterkieser.com/2011/03/25/androids-k-9-mail-battery-life-and-dovecots-push-imap/

Finally, it is of course possible that I have a bug somewhere :)
Title: Re: Too many IMAP Push connections
Post by: potatohead on November 04, 2014, 10:41:37 am
Hello Kostya,

thank you very much for the forum and your help.

I have the same issue.

I check 6 mailboxes on 3 different domains. No server limit, no Gmail mailbox. Every mailbox has the same standard folders (drafts, inbox, sent, trash). No subfolders.

It worked fine with 5 mailboxes. Since I installed the 6th I've got the problem.

Tried everything like "cropping to K9" and other settings. But I'm getting the same fault. By the way the battery is getting down very fast since the fault started.

Can you help me in my case?

Bernd

Title: Re: Too many IMAP Push connections
Post by: Kostya Vasilyev on November 05, 2014, 11:50:20 am
I just checked my code -- it can work with up to 25 IMAP IDLE folders (connections) -- there is probably an off-by-one somewhere :)

I believe it's a perfectly reasonable "max" for mobile devices. I'm sure it's wonderful that K9 has a setting for 1,000 folders in push mode -- or is it 10,000? Why not 1,000,000?
Title: Re: Too many IMAP Push connections
Post by: potatohead on November 05, 2014, 03:11:13 pm
I bought AquaMail, because I think it's better than K9  ;)
"cropping to K9" was a tip from you in this forum in another thread.

6 mailboxes x 4 folders = 24 IMAP IDLE folders .. should work without fault. Make it work with 26 IDLES than the off-by-one is good for me  ::)

What can you do? I like AquaMail and want to use it further.

EDIT:
Sorry Kostaya, I made a mistake. Forgot the "junk" folder.

So I have 6 x 5 folders = 30 IMAP IDLEs!  :-[
Good news: No reason for you to look for the one-by-one. I tried to cut "drafts" an "junk" .... it works without fault  :D
Bad news: What to do if I need to push more than 6 mailboxes or subfolders?? No way to increase this value a bit?

Title: Re: Too many IMAP Push connections
Post by: Tronic on November 06, 2014, 02:46:08 pm
One other thing to keep in mind -- Dovecot sends dummy "keep-alive" packets as well, and they will wake up the device.

<not allowed external link> 
Maybe have a look at:
http:// razor.occams.info/blog/2014/08/09/how-bad-is-imap-idle/
Sorry, for that, but I get a message "Sorry, you are not allowed to post external links.". Why ever!

Finally, it is of course possible that I have a bug somewhere :)
That is possible any time in any software ;-)

I was observing Aqua Mail and K-@ Mail the last days and recognized the battery consumption of both is nearly the same, but K-@ has 2.5 times more push folders. Anyway Aqua has a much more WakeLocks and CPU activity (see screenshots).

So, still the question why not raise the limit for push folders up to 50 or 100 and set a default at 25?

Best regards,
Tom
Title: Re: Too many IMAP Push connections
Post by: Tronic on November 13, 2014, 10:20:39 am
Hi, could you elaborate on the few options missing? Thanks
Hi, I will try to elaborate it at weekend, because I'm a bit busy at the moment.
If the "feature request" forum would be open I did it there ;)
Title: Missing settings
Post by: Tronic on November 16, 2014, 04:26:38 pm
Hi, could you elaborate on the few options missing? Thanks
I use the German version and I don't know the exact translations for the settings, but I will do my best  ;)

1) Sync settings
I just can choose "monitor all", "sync even if auto-sync is off" or "sync even if backgorund data is off". In some situation (like locations without internet connection) I need an option to disable synchronization complete with on switch. I miss at least "sync off if auto-sync is off" or "never sync" as a global option

2) User interface - landscape mode
For portrait mode I'm able to set, if I want to you split view (mail list and mail view) and how (vertical or horizontal). For landscape mode there is no setting and I have split view - if I want it or not!

3) Mail view - list of known senders
I can just delete the whole list of known senders. It would be nice to edit it or better to use an existing address book (on top of existing contacts) for known senders like in Thunderbird.

4) Account > Options and folders > account settings
The option "folder sorting" should be available as a global option for all accounts with possibility to overwrite that per account like other options (e. g. sync settings).

5) Account > Options and folders > folders
I have some sub folders in inbox (in German "Posteingang") and these are displayed near bottom aof the account list - instead of inbox. An additional setting "show at top of folder list" for displaying them below inbox (like in K-@) would be nice.
List of folders displayed at the moment:

List of folders displayed with "option "show at top":

6) User interface, account list or where ever
An option to show special folders ([Sent], [Drafts], ...) at the top of folder list instead of bottom.

This is what I found for the moment. 1, 2 and 5 are "must haves" for me and rest is just "nice to have".