Gitlab数据库postgresql升级报错

gitlab-ctl 数据库升级,数据量过大导致升级超时

gitlab-ctl pg-upgrade timeout

Upgrading the data:Traceback (most recent call last):
        14: from /opt/gitlab/embedded/bin/omnibus-ctl:23:in `<main>'
        13: from /opt/gitlab/embedded/bin/omnibus-ctl:23:in `load'
        12: from /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/omnibus-ctl-0.6.0/bin/omnibus-ctl:31:in `<top (required)>'
        11: from /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:746:in `run'
        10: from /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/omnibus-ctl-0.6.0/lib/omnibus-ctl.rb:204:in `block in add_command_under_category'
         9: from /opt/gitlab/embedded/service/omnibus-ctl/pg-upgrade.rb:140:in `block in load_file'
         8: from /opt/gitlab/embedded/service/omnibus-ctl/pg-upgrade.rb:195:in `general_upgrade'
         7: from /opt/gitlab/embedded/service/omnibus-ctl/pg-upgrade.rb:267:in `run_pg_upgrade'
         6: from /opt/gitlab/embedded/service/omnibus-ctl/pg-upgrade.rb:383:in `progress_message'
         5: from /opt/gitlab/embedded/service/omnibus-ctl/pg-upgrade.rb:269:in `block in run_pg_upgrade'
         4: from /opt/gitlab/embedded/service/omnibus-ctl/lib/gitlab_ctl/pg_upgrade.rb:40:in `run_pg_command'
         3: from /opt/gitlab/embedded/service/omnibus-ctl/lib/gitlab_ctl/util.rb:12:in `get_command_output'
         2: from /opt/gitlab/embedded/service/omnibus-ctl/lib/gitlab_ctl/util.rb:31:in `run_command'
         1: from /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/mixlib-shellout-2.4.4/lib/mixlib/shellout.rb:267:in `run_command'
/opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/mixlib-shellout-2.4.4/lib/mixlib/shellout/unix.rb:126:in `run_command': Command timed out after 600s: (Mixlib::ShellOut::CommandTimeout)
Command exceeded allowed execution time, process terminated
---- Begin output of su - gitlab-psql -c "/opt/gitlab/embedded/bin/pg_upgrade -b /opt/gitlab/embedded/postgresql/9.6/bin -d /var/opt/gitlab/postgresql/data -D /var/opt/gitlab/postgresql/data.10 -B /opt/gitlab/embedded/bin" ----

在这里插入图片描述

解决方案:

vim /opt/gitlab/embedded/lib/ruby/gems/2.5.0/gems/mixlib-shellout-2.4.4/lib/mixlib/shellout.rb
改成6000就好了。
在这里插入图片描述

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值