I'm running an spree 3, rails 4.2.2 site with Postgres as DB engine, Apache/2.4.7 as webserver (through passenger) and redis and I've been experimenting a lot of issues with the speed on my production environment. The load average goes crazy from time to time for no specific reason. Although, I noticed that this happens when new connections hit the site. Then the server's load average goes above 7 and most of the times I end up restarting apache.
Here are the server features:
- 1GB RAM
- Ubuntu 14.04.3 LTS
- 80 GB hard disk
Here's my config/environments/production.rb setup:
Rails.application.configure do
config.cache_classes = true
config.eager_load = false
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
config.assets.digest = true
config.log_level = :info
config.force_ssl = true
config.action_mailer.smtp_settings = {:enable_starttls_auto => false}
config.action_mailer.delivery_method = :sendmail
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = true
Rails.application.config.middleware.use ExceptionNotification::Rack,
:email => {
:email_prefix => "[PRODUCTION] ",
:sender_address => %{"notifier" <errors@something.com>},
:exception_recipients => %w{team@something.com}
}
end
I have set up newrelic but hasn't been very helpful so far.
What do you think I can do to speed up this environment? Any help will be really appreciated.