0 votes

I am a developer working for XXXXX. I was tasked with figuring out some issue we experience with our email handling jobs here, and one of the issues we found is that sometimes, when trying to connect to Gmail, we get the following error (raw):

Limilabs.Client.IMAP.ImapResponseException:
[UNAVAILABLE] Temporary System Error
"StatusLine":"* BYE [UNAVAILABLE] Temporary System Error"

We have couple of questions regarding it:

  1. Do you know what this error means, apart from what stated in the error message ( [UNAVAILABLE] Temporary System Error)?
  2. Do you know what we can do to avoid this?
  3. If it can't be avoided, is there anything we can do to handle it better than failing the job, and trying to connect some minutes later?
  4. Is there any recovery we could perform?

I'm looking forward to hearing from you.

by
edited by

1 Answer

0 votes

Hi Zibi,

I'm afraid there is no perfect answer for this.

I'd first investigate what exactly your application is doing before you get this error.

Logs may help:
https://www.limilabs.com/blog/logging-in-mail-dll


Q: Do you know what this error means, apart from what stated in the error message ( [UNAVAILABLE] Temporary System Error)?

A: This is the server side error: IMAP server is informing you, that it is temporary unavailable.
All ImapResponseExceptions indicate errors returned by the server.

If it happens too often, you should contact your IMAP server administrator.


Q: Do you know what we can do to avoid this?

A: The common cause of this error, is that you're performing large amount of operations in a short time,
and your server is throttling you.

Consider adding a .NET's Thread.Sleep/Task.Delay and check, if the server is more likely to cooperate.

When connected and performing some tasks you can check throttled status on the currently selected folder:

if (imap.CurrentFolder.Throttled)
{
    Thread.Sleep(TimeSpan.FromSeconds(1));
}

....and add some client back-off mechanism.

I believe that Gmail has also other IMAP limits:
https://support.google.com/a/answer/1071518


Q: If it can't be avoided...Is there any recovery we could perform?

A: I don't think there is a different way (apart from checking for throttling status, connecting less frequently).

by (304k points)
...