# ActionMailer Timeout

**URL:** <https://www.ruby-forum.com/t/actionmailer-timeout/105413>\
**Category:** Deployment\
**Created:** [May 29, 2007, 7:57pm UTC](https://www.ruby-forum.com/t/actionmailer-timeout/105413 "2007-05-29T19:57:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![bcm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/977dab/32.png) [@bcm](https://www.ruby-forum.com/u/bcm)\
**Post date:** [May 29, 2007, 7:57pm UTC](https://www.ruby-forum.com/t/actionmailer-timeout/105413/1 "2007-05-29T19:57:38Z")

</div>

I am in the process of deploying an app to a shared server at GoDaddy.  
I know, GoDaddy sucks, I didn’t realize that until I had paid for 2  
years in advance.

Anyway, everything is working fine except for one thing. I am using  
ActionMailer to send SMTP emails from the app and am receiving a  
timeout. I have tried everything I can think of as far as changing my  
configuration. I am a first-timer so this could be a very basic  
mistake. Any guidance would be appreciated.

My environment.rb file (excerpt):

ActionMailer::Base.delivery\_method = :smtp  
ActionMailer::Base.server\_settings = {  
:address =\> “[smtpout.secureserver.net](http://smtpout.secureserver.net)”,  
:port =\> 80,  
:domain =\> “[www.mydomain.com](http://www.mydomain.com)”,  
:authentication =\> :login,  
:user\_name =\> “removed\_email\_address@domain.invalid”,  
:password =\> “xxxxxxxx”  
}

################################################################  
Error in the log:

Timeout::Error (execution expired):  
/usr/local/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill' /usr/local/lib/ruby/1.8/timeout.rb:56:in `timeout’  
/usr/local/lib/ruby/1.8/timeout.rb:76:in `timeout' /usr/local/lib/ruby/1.8/net/protocol.rb:132:in `rbuf\_fill’  
/usr/local/lib/ruby/1.8/net/protocol.rb:116:in `readuntil' /usr/local/lib/ruby/1.8/net/protocol.rb:126:in `readline’  
/usr/local/lib/ruby/1.8/net/smtp.rb:664:in `recv_response' /usr/local/lib/ruby/1.8/net/smtp.rb:396:in `do\_start’  
/usr/local/lib/ruby/1.8/net/smtp.rb:686:in `critical' /usr/local/lib/ruby/1.8/net/smtp.rb:396:in `do\_start’  
/usr/local/lib/ruby/1.8/net/smtp.rb:378:in `start' /usr/local/lib/ruby/1.8/net/smtp.rb:316:in `start’  
/vendor/rails/actionmailer/lib/action\_mailer/base.rb:511:in  
`perform_delivery_smtp' /vendor/rails/actionmailer/lib/action_mailer/base.rb:397:in `deliver!’  
/vendor/rails/actionmailer/lib/action\_mailer/base.rb:291:in  
`method_missing' /app/controllers/main_controller.rb:43:in `mail\_request’  
/vendor/rails/actionpack/lib/action\_controller/base.rb:941:in  
`perform_action_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:368:in `perform\_action\_without\_benchmark’  
/vendor/rails/actionpack/lib/action\_controller/benchmarking.rb:69:in  
`perform_action_without_rescue' /usr/local/lib/ruby/1.8/benchmark.rb:293:in `measure’  
/vendor/rails/actionpack/lib/action\_controller/benchmarking.rb:69:in  
`perform_action_without_rescue' /vendor/rails/actionpack/lib/action_controller/rescue.rb:82:in `perform\_action’  
/vendor/rails/actionpack/lib/action\_controller/base.rb:408:in  
`process_without_filters' /vendor/rails/actionpack/lib/action_controller/filters.rb:377:in `process\_without\_session\_management\_support’  
/vendor/rails/actionpack/lib/action\_controller/session\_management.rb:117:in  
`process' /vendor/rails/railties/lib/dispatcher.rb:38:in `dispatch’  
/vendor/rails/railties/lib/fcgi\_handler.rb:150:in `process_request' /vendor/rails/railties/lib/fcgi_handler.rb:54:in `process!’  
/usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in  
`each_cgi' /usr/local/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each\_cgi’  
/vendor/rails/railties/lib/fcgi\_handler.rb:53:in `process!' /vendor/rails/railties/lib/fcgi_handler.rb:23:in `process!’  
/home/content/b/a/m/bamiller3/html/eastside/public/dispatch.fcgi:24

---

<div class="post-metadata">

**Author:** ![bcm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/977dab/32.png) [@bcm](https://www.ruby-forum.com/u/bcm)\
**Post date:** [May 29, 2007, 8:44pm UTC](https://www.ruby-forum.com/t/actionmailer-timeout/105413/2 "2007-05-29T20:44:24Z")

</div>

In your options, the port is set to 80, which is the http port. The  
SMTP port is typically port 25, although you may want to check with  
them to see if they want you to use a different one.

---

<div class="post-metadata">

**Author:** ![bcm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/977dab/32.png) [@bcm](https://www.ruby-forum.com/u/bcm)\
**Post date:** [May 29, 2007, 9:02pm UTC](https://www.ruby-forum.com/t/actionmailer-timeout/105413/3 "2007-05-29T21:02:55Z")

</div>

I had tried port 25 the first time. I changed to to 80 to see if it  
would work because the instructions for setting up outlook express to  
use the same smtp server use port 80. Both ports give me the same  
error.

---

<div class="post-metadata">

**Author:** ![bcm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/977dab/32.png) [@bcm](https://www.ruby-forum.com/u/bcm)\
**Post date:** [May 30, 2007, 4:23am UTC](https://www.ruby-forum.com/t/actionmailer-timeout/105413/4 "2007-05-30T04:23:28Z")

</div>

I just realized something that might be the cause of this problem.  
Correct me if I am wrong, but don’t you have to restart the web server  
when changes are made to the environment.rb file?

It hit me because, I changed the log\_level to :debug and never saw the  
effect of that change. I think I have been trying all kinds of  
combinations of SMTP settings and none actually took effect. In a  
shared hosting situation (specifically GoDaddy) how could I force my  
changes to the environment.rb file to take effect? Is there a way for  
me to restart my own instance of the web server? Any thoughts on this  
would be appreciated.

---

<div class="post-metadata">

**Author:** ![bcm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/977dab/32.png) [@bcm](https://www.ruby-forum.com/u/bcm)\
**Post date:** [May 30, 2007, 4:35am UTC](https://www.ruby-forum.com/t/actionmailer-timeout/105413/5 "2007-05-30T04:35:13Z")

</div>

Try this…

ActionMailer::Base.server\_settings = {  
:address =\> “localhost”,  
:domain =\> ‘[www.yourdomain.com](http://www.yourdomain.com)’,  
:port =\> 25  
}

On 5/29/07, Vince W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > when changes are made to the environment.rb file?
> 
> >

–

“Eppure si muove”

---

<div class="post-metadata">

**Author:** ![bcm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/977dab/32.png) [@bcm](https://www.ruby-forum.com/u/bcm)\
**Post date:** [May 30, 2007, 2:13pm UTC](https://www.ruby-forum.com/t/actionmailer-timeout/105413/6 "2007-05-30T14:13:37Z")

</div>

@Jose G.

OMG that worked! I can’t believe the morons at GoDaddy couldn’t just  
tell me that the webservers run local SMTP-relay, with no  
authentication. You rock, Thanks so much!

---

<div class="post-metadata">

**Author:** ![bcm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/977dab/32.png) [@bcm](https://www.ruby-forum.com/u/bcm)\
**Post date:** [May 30, 2007, 4:32am UTC](https://www.ruby-forum.com/t/actionmailer-timeout/105413/7 "2007-05-30T04:32:13Z")

</div>

I don’t think you need to restart the server anymore in rails \> 1.2  
but I find that it never hurts. One less thing you need to eliminate,  
so if you can restart you may as well.

On 5/29/07, Brent M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> me to restart my own instance of the web server? Any thoughts on this  
> would be appreciated.
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
support independent business – [http://www.buyindie.net/](http://www.buyindie.net/)
