我平均每封电子邮件大约 2000 毫秒。这是正常的吗?你能给我一些你的应用程序中的时间例子吗?电子邮件可以正常发送。我知道我可能应该使用 DelayedJob 或像 SendGrid 这样的 SMTP 中继,但我猜它的时间太长了,而且存在潜在的问题。
2012-06-13T21:28:55+00:00 app web.1 - - Sent mail to ... (7856ms)
2012-06-13T21:28:57+00:00 app web.1 - - Sent mail to ... (2003ms)
2012-06-13T22:24:42+00:00 app web.1 - - Sent mail to ... (3094ms)
2012-06-13T22:24:43+00:00 app web.1 - - Sent mail to ... (1722ms)
2012-06-14T02:20:37+00:00 app web.1 - - Sent mail to ... (5932ms)
2012-06-14T02:22:16+00:00 app web.1 - - Sent mail to ... (1830ms)
2012-06-14T02:22:18+00:00 app web.1 - - Sent mail to ... (1740ms)
如果没有,我该如何调试需要这么长时间的东西?
(顺便说一句, logentries为收集这些数据而震惊)
我的后代 SMTP 设置:
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => "example.com",
:authentication => "plain",
:user_name => "mail@example.com",
:password => "...",
:enable_starttls_auto => true
}