nylas / nylas-mail

:love_letter: An extensible desktop mail app built on the modern web. Forks welcome!
https://nylas.com/nylas-mail/
MIT License
24.81k stars 1.38k forks source link

Syncing doesn't stop, takes up lots of CPU #3362

Closed riccardolardi closed 7 years ago

riccardolardi commented 7 years ago

Arch Linux, Nylas Mail 2.0.8

With Nylas N1 this was fine, this only appeared with Nylas Mail 2.0.8

Nylas Mail doesn't stop syncing my Gmail account. It seems it fetches lots of data/emails but then just continues. While doing this it takes up a lot of CPU resources and my notebook goes full power on the ventilators and it doesn't stop.

If there's any log file I can provide please let me know, I'll be happy to do this.

Bramas commented 7 years ago

Nylas Mail 2.0.8? the last version is 1.0.48 I think. Any way I have the same problem on Mac Os X.

capture d ecran 2017-04-11 10 36 39

And the orange offline box is still there, even though I can read my mails

riccardolardi commented 7 years ago

For Linux there's maybe a more up to date version - I get it from the Arch AUR repository here: https://aur.archlinux.org/packages/nylas-mail

Any help on how to debug this is greatly appreciated.

scgough commented 7 years ago

@Bramas @alberto2000 I had this issue when I first installed 1.0.48 on Mac OS. It did eventually stop but I have since found Nylas seems to sync your entire mailbox to a local cache (https://github.com/nylas/nylas-mail/issues/3351). If your mail box is particularly large this could be why it's taking a while?

jstejada commented 7 years ago

Hi all, this is correct! We sync email to a local cache and try to sync as fast as possible while on power. However, while on battery we throttle our cpu consumption to reduce battery consumption. We're still looking into ways to make Nylas Mail more efficient. Thanks!

riccardolardi commented 7 years ago

Is syncing for over an hour normal then? If so, an option to limit the local email cache is almost a must-have. Nobody wants 20+ GB of email data on their machine.

Bramas commented 7 years ago

It's been several days that Nylas is open on my computer (maybe even weeks) so it is really strange. And still I see no reason for the app to use 120% of my CPU

riccardolardi commented 7 years ago

With 2.0.13 I'm getting this error in devtools which probably is related to this:

/usr/share/nylas-mail/resources/app.asar/src/error-logger.js:101 APIError: Error checking sync health: Auth token missing for account
    at new APIError (/src/flux/errors.es6:57:19)
    at NylasAPIRequest._defaultAuth (/src/flux/nylas-api-request.es6:170:13)
    at /src/flux/nylas-api-request.es6:35:53
    at next (<anonymous>)
    at step (/src/flux/nylas-api-request.es6:7:1)
    at /src/flux/nylas-api-request.es6:7:1
    at /internal_packages/sync-health-checker/lib/sync-health-checker.es6:42:38
    at next (<anonymous>)
    at step (/internal_packages/sync-health-checker/lib/sync-health-checker.es6:2:1)
From previous event:
    at /internal_packages/sync-health-checker/lib/sync-health-checker.es6:2:1 Objectfingerprint: Array[5]pluginIds: Array[1]rateLimit: Object__proto__: Objectmodule.exports.ErrorLogger.reportError @ /usr/share/nylas-mail/resources/app.asar/src/error-logger.js:101
riccardolardi commented 7 years ago

@jstejada I don't think this issue is to be closed, as it is not about Nylas generally syncing technique, it is about some users experiencing problems with syncing, such as the sync never coming to a halt while all seems to have synced

thesmarthomeninja commented 6 years ago

Does anybody know if there is a plugin or way to limit the amount of mail that is downloaded? Like to get it to only go back and fetch the last two weeks on a rolling basis to where it clears anything past two weeks or archives it or something? To where it keeps the memory down? I found the best option it looks like - is to make it to where the attachments have to be downloaded manually but I'm not sure yet if that will be a good remedy because I just installed it as I love this app even due to the deprecation as mailspring seems to be the evolution of it but is imposing a bit of limtations compared to nylas. However I just hope I dont have to switch which I likely will if it builds up because it was a problem I had in the past and just reinstalled it on a fresh new distro. Thanks in advance because I've dug around through about a dozen tickets like this one and haven't found if there was a solution for it - I'm also running ubuntu 16.04 64-bit enviironment with it. Cheers