搭建的gitlab经常莫名其妙地自己停止了

发布于 2022-09-02 15:02:15 字数 3907 浏览 7 评论 0

大家好!我遇见了一个问题,刚搭建的 gitlab,经常用着用着,就出现这个503错误:

Service Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

Additionally, a 503 Service Unavailable error was encountered while trying to use an ErrorDocument to handle the request.

我在终端里,输入: service gitlab status, 显示为:

GitLab is not running.

再次输入命令:service gitlab start,显示为:

Removing stale Unicorn web server pid. This is most likely caused by the web server crashing the last time it ran.
Removing stale Sidekiq job dispatcher pid. This is most likely caused by Sidekiq crashing the last time it ran.
Starting both the GitLab Unicorn and Sidekiq
The GitLab Unicorn web server with pid 24220 is running.
The GitLab Sidekiq job dispatcher with pid 24275 is running.
GitLab and all its components are up and running.

这时候有可以用了,但是经常这样,很麻烦!

我在终端中输入命令:

sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production

得到如下的信息:

System information
System:
Current User:    git
Using RVM:    no
Ruby Version:    2.3.0p0
Gem Version:    2.5.1
Bundler Version:1.12.3
Rake Version:    10.4.2
Sidekiq Version:3.3.0

GitLab information
Version:    7.14.3
Revision:    d321305
Directory:    /home/git/gitlab
DB Adapter:    mysql2
URL:        http://git.cheikh.wang
HTTP Clone URL:    http://git.cheikh.wang/some-group/some-project.git
SSH Clone URL:    git@git.cheikh.wang:some-group/some-project.git
Using LDAP:    no
Using Omniauth:    no

GitLab Shell
Version:    2.6.11
Repositories:    /home/git/repositories/
Hooks:        /home/git/gitlab-shell/hooks/
Git:        /usr/bin/git

在终端中输入自检命令:

sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production

显示为:

Checking GitLab Shell ...

GitLab Shell version >= 2.6.5 ? ... OK (2.6.11)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
Satellites access is drwxr-x---? ... yes
hooks directories in repos are links: ...
LazyWaimai / LazyWaimai-Api ... repository is empty
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: OK
Check directories and files:
    /home/git/repositories/: OK
    /home/git/.ssh/authorized_keys: OK
Test redis-cli executable: redis-cli 3.2.0
Send ping to redis server: PONG
gitlab-shell self-check successful

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... no
  Try fixing it:
  sudo -u git -H RAILS_ENV=production bin/background_jobs start
  For more information see:
  doc/install/installation.md in section "Install Init Script"
  see log/sidekiq.log for possible errors
  Please fix the error above and rerun the checks.

Checking Sidekiq ... Finished

Checking LDAP ...

LDAP is disabled in config/gitlab.yml

Checking LDAP ... Finished

Checking GitLab ...

Git configured with autocrlf=input? ... yes
Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
Database contains orphaned GroupMembers? ... no
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... yes
projects have namespace: ...
LazyWaimai / LazyWaimai-Api ... yes
Projects have satellites? ...
LazyWaimai / LazyWaimai-Api ... can't create, repository is empty
Redis version >= 2.0.0? ... yes
Ruby version >= 2.1.0 ? ... yes (2.3.0)
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (2.7.3)
Active users: 1

Checking GitLab ... Finished

可是我按照它的提示输入

sudo -u git -H RAILS_ENV=production bin/background_jobs start

gitlab 服务却又停止了,无解呀!求助!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

十年不长 2022-09-09 15:02:15

我通过 gitlab 的日志看到是因为内存不够的原因导致 gitlab 的相关服务被自行停止了。我的云主机是1G 的内存,在我给系统添加了 SWAP 分区后,问题得以解决!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文