Loop infinito nell'invio di email di digest

Salve a tutti.

Il nostro server Discourse è entrato in un ciclo infinito inviando email senza sosta. Ecco l’output di shared/standalone/log/rails/production.log:

Delivered mail 7db8eecd-c36a-419c-ae34-0561b08bae25@community.xx.cc (1322.2ms)
  Rendered user_notifications/digest.text.erb (Duration: 50.1ms | Allocations: 12577)
  Rendering user_notifications/digest.html.erb within layouts/email_template
  Rendered user_notifications/digest.html.erb within layouts/email_template (Duration: 139.5ms | Allocations: 26910)
  Rendering user_notifications/digest.text.erb
  Rendered user_notifications/digest.text.erb (Duration: 71.7ms | Allocations: 13505)
Delivered mail 5bbf2e54-96a8-437d-a032-69f98a00f22a@community.xx.cc (1485.2ms)
  Rendering user_notifications/digest.html.erb within layouts/email_template
  Rendered user_notifications/digest.html.erb within layouts/email_template (Duration: 70.9ms | Allocations: 20613)
  Rendering user_notifications/digest.text.erb
  Rendered user_notifications/digest.text.erb (Duration: 38.2ms | Allocations: 11390)

Questo è iniziato all’improvviso (probabilmente quando è partito il cron dei digest:

)

Ora un core è completamente occupato nell’invio delle email dei digest.

  • Il rebuild dell’app non ha aiutato;

  • Aggiornato all’ultima versione: nessun cambiamento;

  • Attivato “Disabilita email di riepilogo per tutti gli utenti” e fatto un rebuild dell’app: nessun cambiamento;

    #### Installed
    
    ### 2.4.0.beta5
    

Cosa altro posso fare? Come posso fermare questo problema?
Grazie in anticipo.

1 Mi Piace

I could be wrong, but I think that what happened is that the summary emails got queued and now it’s delivering them. It’s going to keep going until it delivers them.

If I’m right, You can disable emails then find the table that has them and delete them. But it’s just going to happen again the next time that summary emails go out.

1 Mi Piace

Yes, but this happens for 3 days already. All other mails (register, for example are not delivered anymore. Community works, but all emailing - not).
I found very similar issue - Extreme memory usage due to bad mail credentials. So look like this is some kind of tricky bug.

The only way I found in order to stop this - I removed the auth token in my SMTP provider. Discourse start showing hundreds of errors and only after that load decreased. I restored the token and now all seems ok.

1 Mi Piace

Did you have bad email credentials?

@codinghorror I found the root cause of the issue. Our mail provider removed (for their own stupid reasons) verified host records for our account. The host records were used to provide from field in the email with our host. So after they did that - discourse went into endless loop. I think discourse flow has a bug as well for that case. Because it should report the error and stop load 1 core for 100%.

So account is correct. But mail provider returns an error on mail send “Wrong sending host” or something like that and this flow causes the issue.

2 Mi Piace

I agree, this is a bad state to be in and we should handle it better.

1 Mi Piace

Is everything back to normal now?

Yes. After I changed credentials for mail.

1 Mi Piace