Author Topic: IMAP Push seems to be restarting all the time  (Read 10073 times)

frogworth

  • Newbie
  • *
  • Posts: 13
IMAP Push seems to be restarting all the time
« on: October 25, 2014, 04:40:41 am »
Hi Kostya,
I'm on the beta channel, which may be relevant... And i have my own IMAP server running some version of dovecot (for now).

I've found myself that my battery is running down quite quickly as of recently. I can't definitively pin it down on AquaMail, but I've also noticed that the AquaMail push notification keeps moving to the top of my notifications. New messages are always below the push notification now, which means that anytime a new message comes in, push restarts I guess. Seems to happen at other times frequently too though. I haven't changed any settings since before it was doing this.

I also have a gmail account in there FWIW...

Any suggestions? Thanks!

frogworth

  • Newbie
  • *
  • Posts: 13
Re: IMAP Push seems to be restarting all the time
« Reply #1 on: October 25, 2014, 12:08:18 pm »
Further info: Galaxy S4, Android 4.2.2. Latest beta.

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: IMAP Push seems to be restarting all the time
« Reply #2 on: October 26, 2014, 01:36:00 am »
The position of the notification doesn't mean much -- but since you mention Dovecot:

Dovecot will send "keep alive" data on its IMAP IDLE connections, to prevent those connections from being disconnected by the intermediate networks (providers, home routers, etc.)

Even though Aqua knows to ignore these, they still wake up the device -- and since those network connections are owned by Aqua, those wake-ups are counted towards the app.

The default setting for these is 2 minutes, and may be as low as one minute in the newer Dovecot versions.

Please see this for details -- and for how to change it to a more reasonable setting, like every 5 or 7 or 10 minutes:

https://peterkieser.com/2011/03/25/androids-k-9-mail-battery-life-and-dovecots-push-imap/
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/

frogworth

  • Newbie
  • *
  • Posts: 13
Re: IMAP Push seems to be restarting all the time
« Reply #3 on: October 27, 2014, 06:06:06 am »
Thanks Kostya, I'll check that out!

I'm planning to move to Google hosted mail for my domains soon, so my mail will hopefully be a bit better behaved then...

Kostya Vasilyev

  • Hero Member
  • *****
  • Posts: 12740
Re: IMAP Push seems to be restarting all the time
« Reply #4 on: October 29, 2014, 12:39:30 am »
Oh, Gmail's IMAP IDLE is far from perfect.

In fact, incomplete, it does not send message flag changes (known since 2007, no plans to fix on Google's part).

Aqua has a workaround for it. You'll see message flags (read/unread) update up to 10 minutes late, but at least they will update.

Overall, I'd place Cyrus / Fastmail first, Dovecot second, and Gmail somewhere among the other services with their own IMAP server implementation, but not at the top of that respective section.

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/