AquaMail Forum

English - Android => General Discussion => Topic started by: Thomas on July 07, 2014, 08:05:07 am

Title: Huge amount of wakelocks
Post by: Thomas on July 07, 2014, 08:05:07 am
Seams that something is wrong since the last two versions.
20.000....
(http://img.tapatalk.com/d/14/07/07/aja4avej.jpg)
Title: Re: Huge amount of wakelocks
Post by: Thomas on July 07, 2014, 10:18:49 pm
Seams problem solved with the latest version from yesterday.
Title: Re: Huge amount of wakelocks
Post by: brudu on July 10, 2014, 09:24:25 am
I'm still having this problem.
Title: Re: Huge amount of wakelocks
Post by: Kostya Vasilyev on July 10, 2014, 01:11:23 pm
@brudu, where is your debug log?
Title: Re: Huge amount of wakelocks
Post by: Kostya Vasilyev on July 10, 2014, 01:17:04 pm
@Thomas - there were no changes for IMAP push in 1.4.0.30 vs 1.4.0.27, so there is still a bug lurking somewhere...

If this happens again, can you please capture a debug log before the issue clears?
Title: Re: Huge amount of wakelocks
Post by: medicus07 on July 16, 2014, 11:53:41 pm
Any update on this problem... Still having mass of wakekocks with version 1.4.0.30...
Title: Re: Huge amount of wakelocks
Post by: Kostya Vasilyev on July 17, 2014, 01:05:18 am
@medicus - and still no debug log from you.

Is it common belief that I have telepathic powers (and maybe telekinetic, too)?

I'm definitely flattered, but, actually, no.
Title: Re: Huge amount of wakelocks
Post by: medicus07 on July 18, 2014, 10:55:54 pm
Here my log file... I hope it is the right one.

https://www.dropbox.com/s/lbmjy5wt3g3ps6f/log-AquaMail.txt (https://www.dropbox.com/s/lbmjy5wt3g3ps6f/log-AquaMail.txt)

Gesendet von meinem LG-D855 mit Tapatalk

Title: Re: Huge amount of wakelocks
Post by: Kostya Vasilyev on July 19, 2014, 12:05:32 am
@medicus07:

Thank you.

First, the device's connectivity appears to be sub-par, often lost.

Second, the mail server @mailbox.org sends a "* OK Still here" on the IDLE connections *once a every minute or two*, this wakes up the device (as expected).

This is a Dovecot thing. In general, it's good -- prevents IMAP IDLE network connections from being aborted by the networks between the Android device and the server.

However, doing it once every minute or two is too much.

Aqua is aware of those Dovecot keep-alives, and doesn't do anything at all -- however, this wakes up the device at the network stack level (and then it's counted towards Aqua, since it's Aqua's network connections).

You can tell the people behind the mail service to adjust the setting to five, maybe seven minutes:

# dovecot.conf
protocol imap {
    imap_idle_notify_interval = 5 mins
}

This would benefit everyone who uses their mail service with IMAP IDLE on a mobile device, no matter what the mail app.

https://peterkieser.com/2011/03/25/androids-k-9-mail-battery-life-and-dovecots-push-imap/
Title: Re: Huge amount of wakelocks
Post by: Kostya Vasilyev on July 23, 2014, 02:07:06 am
@Thomas -- I now know what you ran into.

Should be a very rare case, but when it happens, it's bad (like you saw -- many, many short-lived wake locks).

Yes, it's related to push mail, and was not present in version 1.3.

I'm investigating the details, and should have a fix in a few days.
Title: Re: Huge amount of wakelocks
Post by: Thomas on July 23, 2014, 06:17:12 am
The latest Beta is fine so far. Will watch it closely.
Title: Re: Huge amount of wakelocks
Post by: Kostya Vasilyev on July 26, 2014, 02:17:25 am
It's quite a rare occurrence (which is how it went unnoticed), but the released 1.4.0 has it, and all the 1.4.1 versions got it from their parent.

I've been testing a fix for the last 2-3 days, expect to merge the changes and post new builds tomorrow.
Title: Re: Huge amount of wakelocks
Post by: Thomas on July 26, 2014, 02:24:56 am
It's quite a rare occurrence (which is how it went unnoticed), but the released 1.4.0 has it, and all the 1.4.1 versions got it from their parent.

I've been testing a fix for the last 2-3 days, expect to merge the changes and post new builds tomorrow.
Good news. Send me the beta to test if you want.
Title: Re: Huge amount of wakelocks
Post by: Kostya Vasilyev on July 26, 2014, 02:26:53 am
The plan is to merge those fixes into both "stable" and "beta" branches and post on the forum tomorrow.