Gsuite smtp-relay issue "end of file reached"

Forgive me if this is covered somewhere else.

For the past couple of years I have been using Gsuite as an smtp relay for discourse. Today I found the following error when entering discourse.

There are 15547 email jobs that failed. Check your app.yml and ensure that the mail server settings are correct. See the failed jobs in Sidekiq.

The app.yml is setup like this.

SMTP_ADDRESS=smtp-relay.gmail.com
SMTP_PORT=587
SMTP_PASSWORD=
SMTP_USER_NAME=

The Sidekiq dashboard looks like this:

I tried running discourse-doctor and got the following:

==================== MAIL TEST ====================
For a robust test, get an address from http://www.mail-tester.com/
Sending mail to REDACTED  . . 
Testing sending to admin@acescentral.com using smtp-relay.gmail.com:587.
======================================== ERROR ========================================
                                    UNEXPECTED ERROR

end of file reached

====================================== SOLUTION =======================================
This is not a common error. No recommended solution exists!

Please report the exact error message above to https://meta.discourse.org/
(And a solution, if you find one!)
=======================================================================================

In Gsuite my smtp-relay settings are

Allowed senders: Only addresses in my domains
Only accept mail from the specified IP addresses: Yes
Allowed IP addresses: digital ocean discourse production
Require SMTP Authentication: No
Require TLS encryption: Yes

Is there anything that I’m doing obviously incorrectly?

Thanks in advance
`

There’s some discussion on the same issue going on over here, though no solutions yet.

Looks like the timing on your failures roughly matches (mine started about 5 days ago, looks like yours started ticking up a few days prior).

1 Like

New message today …

  • The number of queued jobs is 130988, which is high. This could indicate a problem with the Sidekiq process(es), or you may need to add more Sidekiq workers.

It can’t send messages, so they’re queuing up - nothing unexpected there. I’ve still no idea why the Google smtp-relay has suddenly stopped working, though.

Is it worth clearing the queue? Will the backlog crash the server?

It doesn’t matter. Unless the actual issue sending mails is resolved, the backlog will just return.