macOS sends Mailspring to "sleep" at random times

Description

Rather regularly (about once every 1-2 weeks, maybe during times of high system load or if I haven’t restarted mac for a few days) I notice a very annoying issue, where Mailspring stops doing anything in background.

To Reproduce…

Here’s how I usually notice there is a problem:

  • converse with someone over email
  • type a new email response
  • hit send. Watch “Sending soon…” countdown disappear, “Sending…” spinner appear
  • close Mailspring window, leaving it running in the dock
  • few hours later realise that there has been no response from my contact
  • open Mailspring and observe the same “Sending…” spinner
  • see Mailspring actually send an email, hours later
    Sometimes Mailspring wakes up, then checkes for emails and spams me with 5-10 notifications for all the emails that I missed while Mailspring was inactive.

I have no idea how to reproduce this issue. Maybe someone can explain me how to collect pertinent logs, so that I share them next time I encounter the problem?

Setup

  • OS and Version: macOS 10.14.6
  • Mailspring Version: Mailspring Version 1.7.2

(Originally posted by kanunnikau on GitHub.)