0

EC2 で RorR アプリを実行しています (マイクロ インスタンス、メモリ 590 MB 以下)。
カピストラーノでアプリを展開すると、アセットのコンパイル時にメモリ使用量が約 98.7% に達します...
この使用量を減らす方法はありますか?

これは私の deploy.rb です

require "bundler/capistrano"

set :application, "name"
set :repository,  "git@github.com:user/app.git"

set :scm, :git

role :web, "server.compute.amazonaws.com" 
role :app, "server.compute.amazonaws.com" 
role :db,  "server.compute.amazonaws.com", :primary => true

set :user, "user"
set :use_sudo, false

default_run_options[:pty] = true
ssh_options[:forward_agent] = true
ssh_options[:keys] = ["#{ENV['HOME']}/key.pem"]

# if you want to clean up old releases on each deploy uncomment this:
after "deploy:restart", "deploy:cleanup"

set :deploy_to, "/home/user"
set :deploy_via, :remote_cache

role :web, "server.compute.amazonaws.com" # Your HTTP server, Apache/etc
role :app, "server.compute.amazonaws.com" # This may be the same as your `Web` server
role :db, "server.compute.amazonaws.com", :primary => true # This is where Rails migrations will run

# if you're still using the script/reaper helper you will need
# these http://github.com/rails/irs_process_scripts

これは期待される動作ですか?メモリを増やすべきですか?
私は 256 MB の digitalocean.com で VM を使用していましたが、現在は 590 MB の EC2 を使用していますが、消費量はまだほぼ 100% に達しています。

4

1 に答える 1

0

Rails 3.1.1を実行している場合、問題はおそらくこの問題に関連しています:https ://github.com/rails/rails/issues/3694 。Rails 3.2で修正されているので、アップグレードすることで問題が解決するはずです。

于 2012-08-11T23:12:10.687 に答える