Eric Norcross
Eric Norcross

Reputation: 4306

ActionMailer Timing out

I'm using Rails 3.2.17 and ActionMailer to send out emails. In the development environment I used my google account to send email and it worked fine. On production, with the production email settings it's timing out. To verify I copied over the production settings to dev.

Currently it's failing with very little info:

Rendered notifications_mailer/access_granted.html.haml (2.8ms)
  Rendered notifications_mailer/access_granted.text.haml (1.5ms)
E, [2014-03-27T12:15:16.066641 #36665] ERROR -- : worker=1 PID:36673 timeout (16s > 15s), killing
E, [2014-03-27T12:15:16.079432 #36665] ERROR -- : reaped #<Process::Status: pid 36673 SIGKILL (signal 9)> worker=1
I, [2014-03-27T12:15:16.096443 #36684]  INFO -- : worker=1 ready

SMTP Settings

config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
  address:              "secure.emailsrvr.com",
  port:                 465,
  domain:               "MYDOMAIN.net",
  authentication:       :plain,
  enable_starttls_auto: true,
  user_name:            "[email protected]",
  password:             "MYPASSWORD"

I've used telnet to confirm the host and port, however when I try to send mail according to this tutorial it disconnects me.

Telnet Console

$ telnet secure.emailsrvr.com 465
Trying 166.78.79.129...
Connected to secure.emailsrvr.com.
Escape character is '^]'.
hello me
Mail from: [email protected]
Connection closed by foreign host.

Additionally, I've setup my email app (Mac Mail) with this information and AM able to send email with these settings.

Any advice on how to approach troubleshooting this would be greatly appreciated.

Upvotes: 1

Views: 819

Answers (1)

Sourabh Upadhyay
Sourabh Upadhyay

Reputation: 1044

you should increase pool time in your database yml file. It will eliminate time out problem.

Upvotes: 1

Related Questions