I have my Rails app in an Apache server. If i don''t use this app for a
while it goes very slow the first clic. After this first clic, it goes
very fast. I want the first response to be fast too.
My production.rb file is:
# Settings specified here will take precedence over those in
config/environment.rb
# In the development environment your application''s code is reloaded on
# every request. This slows down response time but is perfect for
development
# since you don''t have to restart the webserver when you make code
changes.
config.cache_classes = false
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
config.action_view.cache_template_extensions = false
# Don''t care if the mailer can''t send
config.action_mailer.raise_delivery_errors = true
# set delivery method to :smtp, :sendmail or :test
config.action_mailer.delivery_method = :activerecord
# these options are only needed if you choose smtp delivery
config.action_mailer.smtp_settings = {
:address => "...",
:port => 25,
:domain => ''...'',
:authentication => :login,
:user_name => "...",
:password => ''...''
}
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
On 23 Apr 2008, at 13:20, John Smith wrote:> > I have my Rails app in an Apache server. If i don''t use this app for a > while it goes very slow the first clic. After this first clic, it goes > very fast. I want the first response to be fast too. > My production.rb file is: >If you''re using fastcgi then it''s probably your fastcgi listeners getting killed off. You can probably tweak this in your apache config but it''s been so long since i''ve used fastcgi that I don''t recall how. Fred --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Any idea? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
For me, I have the following in my apache''s httpd.conf file: # FastCGI <IfModule mod_fastcgi.c> FastCgiIpcDir /tmp/fcgi_ipc FastCgiConfig -initial-env RAILS_ENV=production FastCgiServer /home/client/current/public/dispatch.fcgi -initial-env RAILS_ENV=production -processes 1 -idle-timeout 60 FastCgiServer /home/client2/current/public/dispatch.fcgi -initial- env RAILS_ENV=production -processes 2 -idle-timeout 60 FastCgiServer /home/client3/clientapp/public/dispatch.fcgi -initial- env RAILS_ENV=production -processes 2 -idle-timeout 60 </IfModule> This makes ''em permanent processes. HTH! -Danimal On Apr 24, 4:57 am, John Smith <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Any idea? > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---