Bundler表示在部署期间内存不足

时间:2016-03-29 07:43:44

标签: ruby-on-rails git capistrano bundler

我的部署失败了class Node<Element> { var next: Node<Element>? } 。完成追溯:

Cannot allocate memory - git

我的资源就像部署开始一样:

DEBUG [5e6f2497]    fatal: Not a git repository (or any of the parent directories): .git
DEBUG [5e6f2497]    Unfortunately, a fatal error has occurred. Please see the Bundler
DEBUG [5e6f2497]    troubleshooting documentation at http://<censored>/bundler-issues. Thanks!
DEBUG [5e6f2497]    /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:88:in ``': Cannot allocate memory - git
DEBUG [5e6f2497]     (Errno::ENOMEM)
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:88:in `git'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:105:in `block in has_revision_cached?'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:130:in `chdir'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:130:in `in_path'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:105:in `has_revision_cached?'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/source/git/git_proxy.rb:39:in `checkout'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/source/git.rb:144:in `specs'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/lazy_specification.rb:52:in `__materialize__'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/spec_set.rb:88:in `block in materialize'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `map!'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/spec_set.rb:85:in `materialize'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/definition.rb:114:in `specs'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/definition.rb:109:in `resolve_remotely!'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/installer.rb:83:in `run'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/installer.rb:14:in `install'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/cli.rb:247:in `install'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/bin/bundle:20:in `block in <top (required)>'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/gems/bundler-1.3.5/bin/bundle:20:in `<top (required)>'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/bin/bundle:23:in `load'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@global/bin/bundle:23:in `<main>'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@staging/bin/ruby_executable_hooks:15:in `eval'
DEBUG [5e6f2497]        from /home/deploy/.rvm/gems/ruby-2.0.0-p353@staging/bin/ruby_executable_hooks:15:in `<main>'
cap aborted!

在部署崩溃之前资源的外观如何:

top - 14:23:26 up 104 days, 11:52,  1 user,  load average: 0.01, 0.15, 0.18
Tasks: 140 total,   1 running, 139 sleeping,   0 stopped,   0 zombie
%Cpu(s):  0.0 us,  0.0 sy,  0.0 ni, 99.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   1007920 total,   672572 used,   335348 free,     2360 buffers
KiB Swap:   524284 total,   260684 used,   263600 free,    86596 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
    7 root      20   0     0    0    0 S   0.3  0.0  41:06.20 rcu_sched
 3023 postgres  20   0 99.1m 1500  992 S   0.3  0.1  24:27.22 postgres

正如你所看到的,还有很多记忆。我也试过升级我的捆绑版本:

top - 14:26:47 up 104 days, 11:56,  1 user,  load average: 0.57, 0.23, 0.19
Tasks: 147 total,   2 running, 145 sleeping,   0 stopped,   0 zombie
%Cpu(s): 12.5 us,  0.0 sy,  0.0 ni, 87.0 id,  0.4 wa,  0.0 hi,  0.0 si,  0.0 st
KiB Mem:   1007920 total,   993468 used,    14452 free,      648 buffers
KiB Swap:   524284 total,   323304 used,   200980 free,    72480 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
31992 deploy    20   0  453m 384m 1816 R 100.1 39.0   0:55.69 ruby
    1 root      20   0 27100  216    0 S   0.0  0.0   0:29.17 init
    2 root      20   0     0    0    0 S   0.0  0.0   0:00.00 kthreadd

我还应该尝试其他什么?

0 个答案:

没有答案