RAILS_ENV=production rails console
/usr/local/rvm/gems/[email protected]/gems/spring-1.1.3/lib/spring/application.rb:153:in `fork': Cannot allocate memory - fork(2) (Errno::ENOMEM)
from /usr/local/rvm/gems/[email protected]/gems/spring-1.1.3/lib/spring/application.rb:153:in `serve'
from /usr/local/rvm/gems/[email protected]/gems/spring-1.1.3/lib/spring/application.rb:128:in `block in run'
from /usr/local/rvm/gems/[email protected]/gems/spring-1.1.3/lib/spring/application.rb:122:in `loop'
from /usr/local/rvm/gems/[email protected]/gems/spring-1.1.3/lib/spring/application.rb:122:in `run'
from /usr/local/rvm/gems/[email protected]/gems/spring-1.1.3/lib/spring/application/boot.rb:18:in `<top (required)>'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /usr/local/rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from -e:1:in `<main>'
$ free -mt
total used free shared buffers cached
Mem: 490 468 21 0 15 35
-/+ buffers/cache: 418 71
Swap: 0 0 0
Total: 490 468 21
就跑了 postgresql, unicorn rails, cronjob 里只有一个每天执行一次 rails runner Model.method 而已。 是不是 512 太少了?我需要升级内存吗?