Author Topic: Too many IMAP Push connections  (Read 23430 times)

MRAndroid

  • Newbie
  • *
  • Posts: 2
Too many IMAP Push connections
« 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.

Nedal0

  • Newbie
  • *
  • Posts: 8
Re: Too many IMAP Push connections
« Reply #1 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

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Too many IMAP Push connections
« Reply #2 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.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

spider623

  • Newbie
  • *
  • Posts: 2
Re: Too many IMAP Push connections
« Reply #3 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
Using Tapatalk

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Too many IMAP Push connections
« Reply #4 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...
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Yury

  • Newbie
  • *
  • Posts: 35
Re: Too many IMAP Push connections
« Reply #5 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.

spider623

  • Newbie
  • *
  • Posts: 2
Re: Too many IMAP Push connections
« Reply #6 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

Using Tapatalk

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Too many IMAP Push connections
« Reply #7 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.
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Tronic

  • Newbie
  • *
  • Posts: 14
Re: Too many IMAP Push connections
« Reply #8 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!

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Too many IMAP Push connections
« Reply #9 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).
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

Tronic

  • Newbie
  • *
  • Posts: 14
Re: Too many IMAP Push connections
« Reply #10 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.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Too many IMAP Push connections
« Reply #11 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 :)
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

potatohead

  • Newbie
  • *
  • Posts: 2
Re: Too many IMAP Push connections
« Reply #12 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


Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: Too many IMAP Push connections
« Reply #13 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?
Creating debug logs for diagnostics: https://www.aqua-mail.com/troubleshooting/

The official FAQ: https://www.aqua-mail.com/faq/

Лог-файлы для диагностики: https://www.aqua-mail.com/ru/troubleshooting/

Вопросы и ответы: https://www.aqua-mail.com/ru/faq/

potatohead

  • Newbie
  • *
  • Posts: 2
Re: Too many IMAP Push connections
« Reply #14 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?

« Last Edit: November 05, 2014, 04:03:33 pm by potatohead »