# בעיית Gsuite smtp-relay "end of file reached"

**URL:** https://meta.discourse.org/t/gsuite-smtp-relay-issue-end-of-file-reached/176622
**Category:** Support
**Created:** [19 בינואר,‏ 2021,‏ 9:16pm UTC](https://meta.discourse.org/t/gsuite-smtp-relay-issue-end-of-file-reached/176622 "2021-01-19T21:16:00Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![agf1997](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@agf1997](https://meta.discourse.org/u/agf1997)
#### Post date: [19 בינואר,‏ 2021,‏ 9:16pm UTC](https://meta.discourse.org/t/gsuite-smtp-relay-issue-end-of-file-reached/176622/1 "2021-01-19T21:16:00Z")

</div>

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.

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

```

The `Sidekiq` dashboard looks like this:

 ![Screen Shot 2021-01-19 at 1.08.58 PM](https://global.discourse-cdn.com/meta/original/3X/c/d/cd95477eab1080b9afdf9697490f22788dd51cc0.jpeg)

I tried running `discourse-doctor` and got the following:

```plaintext
==================== 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

```plaintext
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  
`

---

<div class="post-metadata">

### Author: ![Syonyk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/syonyk/32/206551_2.png) [@Syonyk](https://meta.discourse.org/u/Syonyk)
#### Post date: [19 בינואר,‏ 2021,‏ 9:41pm UTC](https://meta.discourse.org/t/gsuite-smtp-relay-issue-end-of-file-reached/176622/2 "2021-01-19T21:41:20Z")

</div>

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

> [@Emails have stopped sending - end of file reached](https://meta.discourse.org/t/emails-have-stopped-sending-end-of-file-error/176486):
>
> Hi all, and apologies if this is similar to some of the other posts that mention this error. For the last four days all emails have stopped getting sent, and the test email also fails. I have browsed through existing topics that are similar, but in my case nothing (that I am aware of) has changed, and email has stopped working after previously working for months without issue. We are using hosting on Digital Ocean, and are using G Suite SMTP relay configured to relay emails from the droplet’s…

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).

---

<div class="post-metadata">

### Author: ![agf1997](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@agf1997](https://meta.discourse.org/u/agf1997)
#### Post date: [20 בינואר,‏ 2021,‏ 4:15pm UTC](https://meta.discourse.org/t/gsuite-smtp-relay-issue-end-of-file-reached/176622/3 "2021-01-20T16:15:49Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Syonyk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/syonyk/32/206551_2.png) [@Syonyk](https://meta.discourse.org/u/Syonyk)
#### Post date: [20 בינואר,‏ 2021,‏ 5:00pm UTC](https://meta.discourse.org/t/gsuite-smtp-relay-issue-end-of-file-reached/176622/4 "2021-01-20T17:00:22Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![agf1997](https://avatars.discourse-cdn.com/v4/letter/a/977dab/32.png) [@agf1997](https://meta.discourse.org/u/agf1997)
#### Post date: [20 בינואר,‏ 2021,‏ 5:26pm UTC](https://meta.discourse.org/t/gsuite-smtp-relay-issue-end-of-file-reached/176622/5 "2021-01-20T17:26:31Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Syonyk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/syonyk/32/206551_2.png) [@Syonyk](https://meta.discourse.org/u/Syonyk)
#### Post date: [20 בינואר,‏ 2021,‏ 6:03pm UTC](https://meta.discourse.org/t/gsuite-smtp-relay-issue-end-of-file-reached/176622/6 "2021-01-20T18:03:18Z")

</div>

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