Slow loading Wiki page (simple) - high CPU usage from ruby - 503 errors

Our setup

GitLab CE: 13.6.7 (installed from source)
Ubuntu: 14.04
DigitalOcean VM: 48GB RAM - 16 vCPU
Memory Usage: 22GB/48GB
Ruby num_workers = 4 (tried 2 as well)

Output from both bundle exec rake gitlab:env:info and bundle exec rake gitlab:env:check have no errors.

The problem

  • Loading a simple 55 line wiki page on our GitLab instance takes roughly 4-6 seconds. If we have a group in a meeting that reloads the page at the same time (40-50 people), the users get a 503 server error.
  • Most wiki pages load quickly.
  • Moving this page to a different users wiki on GitLab, the page loads instantly.
  • While loading the page top shows: 99% CPU usage for Ruby.
  • No errors that we can see in production, sidekiq, gitlay or workhorse logs. Though it is possible I am missing something obvious when looking.

As I have very little experience with Ruby, and even less when debugging Ruby, and don’t really know how to approach troubleshooting this issue, I would welcome any suggestions the community may have.


When starting GitLab, this is output:

Sidekiq output will be written to /home/git/gitlab/log/sidekiq.log
…Waited 30s for the processes to write their pids, something probably went wrong.

Sidekiq appears to be running normally, no errors in the sidekiq log, and jobs are processed successfully.