AquaMail Forum

English => General Discussion => Topic started by: Rocketsheep on November 13, 2013, 08:14:12 pm

Title: Wake Lock
Post by: Rocketsheep on November 13, 2013, 08:14:12 pm
Hi there,

aqua-mail has excessive wakeup times from time to time. When i deinstall it and reinstall it everything is fine for a while.

I just deinstalled yesterday because aqua was sucking my battery dry.

Today an app called Wakelock Detector shows me this. Is 37m okay?

I just activated logging but i guess it has to run some time...
Title: Re: Wake Lock
Post by: Kostya Vasilyev on November 14, 2013, 02:25:49 am
Seems a bit high, can you show the system's "battery" screen, so I can know what I'm looking at?

The most common reasons for high battery use are:

- Too many folders in IMAP push mode (above 1-2-3), especially Gmail accounts

- Too high "messages per page" settings, which is how many recent messages the app looks at every time it checks mail or catches up to push. The default is 25 (same as K9, Mail Droid, and stock Email, but the setting goes up to 1000, IIRC).

- With push off, very frequent mail check schedule

Several of these combined can be especially deadly.
Title: Re: Wake Lock
Post by: Rocketsheep on November 15, 2013, 05:03:17 pm
Hi there,

here is the battery screen. Btw when i deinstall aqua completly the battery drain is gone :( I also tried to restore without app settings, just in case, although i only change UI Settings (dark and folder colors).



Title: Re: Wake Lock
Post by: Kostya Vasilyev on November 18, 2013, 02:16:13 am
Ok, so when you restored without carrying over app settings, where do we end up with battery use?

What version of AquaMail?

Could you capture the issue in a debug log (left running for a few hours)?
Title: Re: Wake Lock
Post by: Rocketsheep on November 21, 2013, 07:24:47 pm
unfortunately it doesn't help. Aqua still wakes the device for more than 30 minutes. Recent changes shows Version 1.2.5.5

I already sent a debug log to you some days ago (14.11.13).
Title: Re: Wake Lock
Post by: Kostya Vasilyev on November 25, 2013, 01:56:36 am
Hmm, I don't recall getting a debug log from you (unless your "real" name is "A. F.").

30 minutes over what time?

The Nov 15 screenshot show AquaMail at 3% of all battery use, and even the Android OS is quite low....

Also in that screenshot, the device has been running on battery for 3.5 hours, and if AM was keeping the device awake for 1/7 of that time, it would surely be shown as more than those 3%...

So far, I'm quite confused, sorry.
Title: Re: Wake Lock
Post by: vince on March 17, 2014, 10:02:02 pm
I also get excessive wakelocks from Aquamail.  Besides Google Services, it's my biggest offender.  Averages about 10 minutes (24 events) per 4 hours.  IMAP off.  Push off.  1 hour check interval on 2 accounts (one Gmail and one something else).  Love the app, but it kills my battery.
Title: Re: Wake Lock
Post by: Kostya Vasilyev on March 24, 2014, 02:19:55 am
@vince -- what is the actual battery use percentage, by AquaMail, in system settings -> battery?
Title: Re: Wake Lock
Post by: datman on April 03, 2014, 05:53:39 am
My wake locks are also high. I have another email app called Blue Mail. I set up Imap push for the same accounts on both Blue and Aqua Mail. Aqua had way more wake locks when notifications came in for the same time.

Sent from my Nexus 4 using Tapatalk

Title: Re: Wake Lock
Post by: Kostya Vasilyev on April 03, 2014, 09:05:49 pm
@datman -- what is the actual battery use percentage, by AquaMail, in system settings -> battery?
Title: Re: Wake Lock
Post by: datman on April 03, 2014, 09:35:31 pm
@datman -- what is the actual battery use percentage, by AquaMail, in system settings -> battery?

I already changed the settings and rebooted. I'll have to reconfigure it in order to compare them. I'll report back later this week.

Sent from my Nexus 4 using Tapatalk

Title: Re: Wake Lock
Post by: datman on April 09, 2014, 05:05:45 pm
@datman -- what is the actual battery use percentage, by AquaMail, in system settings -> battery?

Aqua Mail isn't showing up there.

Sent from my Nexus 4 using Tapatalk

Title: Re: Wake Lock
Post by: Kostya Vasilyev on April 10, 2014, 02:00:06 am
If it's not showing in system settings -> battery use, it means it's "below the radar" of what the system code is able to detect -- below the lowest consumer shown there.
Title: Re: Wake Lock
Post by: jocaferlo on April 11, 2014, 04:11:41 pm
Hello.

I am using AM pro since four days ago. I also have many battery use by the app.
You can see the screenshots: in settings-battery AM has consumed 16%, just below the consumption of screen.
And with BetterBatteryStats I see that of 7 hours the device is unpluged, almost 3 hours AM kept awake the phone.

My AM configuration:
-I have 6 accounts: 4 IMAP with Push and 2 Hotmail
-I have enabled PUSH and set synchronization every 2 hours
-But in 5 hours of this 7 hours the device is unpluged I had disabled PUSH with Tasker plugin, and I was always with wifi in this 5 hours.
-Yesterday the behaivor was the same. At night I rebooted the phone and I wiped cache and dalvik in recovery.

But today the same.

Before AM I used Maildroid for some years ago and the consumption of this app never appeared in system settings - battery. The mail accounts are the same.
Is there any possible solution? Am I doing something wrong?

Regards.


Title: Re: Wake Lock
Post by: Kostya Vasilyev on April 14, 2014, 02:30:27 am
Did you touch the "messages per page" setting, global or per account? This is how many messages the app keeps up to date when it checks mail, per folder. The default is 25.

If you hadn't, could you please capture the issue in a debug log? With "raw session data" enabled, please, without push mail, and over the span of 6-8 hours (since your sync freq is 2 hours).
Title: Re: Wake Lock
Post by: jocaferlo on April 14, 2014, 04:06:59 am
I had set global "messages per page" setting to 50. I changed now to 15, really I think is enough for me.
Per account setting was at 15.

Anyway these two last days the consuption wasn't so high. AM doesn't appear in system settings /battery. And the wakelocks in BetterBateryStats aren't so numerous.
I think I didn't change anything in AM settings. Only these days (at weekend) I didn't disable PUSH with Tasker plugin (I only do that in the office).
I'll see what happens tomorrow, in the office again.
Title: Re: Wake Lock
Post by: Kostya Vasilyev on April 17, 2014, 11:12:43 pm
Well, syncing 50 messages can be a bit slowed than the default 25 (or 15), esp. on high latency mobile networks (e.g. EDGE or even HSDPA... LTE has much lower latency, though).
Title: Re: Wake Lock
Post by: jocaferlo on April 25, 2014, 10:56:57 pm
The behavior of AM for me is very strange: some days I haven't wakelocks and other I have a lot of them.
Usually when I have PUSH activated all the time (at weekends) its bahavior is ok. But when I turn off PUSH (when I stay at office) I have a lot of wakelocks and AM consume a lot of battery. I turn off PUSH with Tasker plugin.
The attached images show the consumption of one of this days.
For these accounts I use with push I have sync off. Then when I turn off push, in theory, I couldn't receive emails, but sometimes I receive them anyway.

I'll made a debug log.

Regards.
Title: Re: Wake Lock
Post by: Kostya Vasilyev on April 27, 2014, 01:58:06 am
@jocaferlo - I agree this looks strange.

Would be happy to investigate if you recorded a debug log. Please send to kmansoft / gmail.

Thanks in advance.
Title: Re: Wake Lock
Post by: jocaferlo on April 27, 2014, 03:16:52 am
Today I recorded a debug log, but today all was "normal", any excessive consumption.
I turned off PUSH in global settings and I activated sync in all accounts with an interval of 1 hour.

I'll record another debug log on monday, in the same conditions that I have excessive consumption other days.
Title: Re: Wake Lock
Post by: jocaferlo on April 29, 2014, 08:06:25 pm
I recorded a debug log today. The behavior of AM wasn't "normal" today, so I'm going to send you the log file (by mail).

I recorded since 10 o'clock until 17:30 aprox.
In all this time I was at office since 10 to 11:30, since 12:00 to 14:00, and since 16:20 to 17:30 ... aprox.
At office I turned off PUSH (with Tasker plugin) for three of the four accounts that by default I have enabled PUSH.
The rest of the time (out of the office) I have turned on PUSH for four accounts and enabled background sync every 1 hour for another two accounts.

As you can see in the attached screenshots my phone was always active coinciding with the time I was in office, and AM seems to be the culprit.

Regards.
Title: Re: Wake Lock
Post by: Kostya Vasilyev on May 02, 2014, 01:55:43 am
Yes, this is not good, and I'd be happy to investigate -- but it's three days later, and I have not received your log (yes, I checked the spam folder too).

Can you please send it (maybe "again", if you had done this already)?
Title: Re: Wake Lock
Post by: jocaferlo on May 02, 2014, 07:53:17 am
I just send it again to your email kmansoft / gmail.
This time from my previous account and from my gmail account.
Title: Re: Wake Lock
Post by: Kostya Vasilyev on May 07, 2014, 02:03:15 am
Posting the results:

@jocaferlo has a desktop mail app checking same accounts at his office computer, and wanted to avoid double notifications.

He was using Tasker to turn push mail on and off, driven by the device connecting to a WiFi network at the office.

In the log, I could see that Tasker was telling AquaMail turn push on and and off close to 100 times a day -- not the handful of times as would be expected.

I don't know if this is a bug in Tasker, or a compatibility issue between the Android device and the office WiFi network (more likely), but the result was --

-- AquaMail was getting told to start up push mail about 50 times a day.

My recommendation was to use Tasker to only turn off notifications when at the office.
Title: Re: Wake Lock
Post by: jocaferlo on May 08, 2014, 11:24:27 am
That's right, sometimes my phone connects and disconnects continuously from wif network.
Turning off notifications when at the office solves my needs and I don't have an excessive batery drain.