GitLab (Unicorn) Memory Consumption Issues
Hello,
I've noticed this issue on three instances of GitLab i've been running. I am using an external Nginx, and it's installed via Omnibus. I have a 2-core processor and 2GBs of ram (Digital Ocean VM). It seems that the Unicorn killer is running, but it isn't killing any processes. When I manually kill them, memory consumption goes down, but then it creeps back up again. It's a pain because it goes from like 25% to 80% usage in a matter of hours. I now set a cron job to restart unicorn every 4 hours, but this seems a little excessive. Any idea what could be going on here?
One thing I noticed when greping for Unicorn was this odd "process" that I can't explain or figure out a way to remove:
➜ ~ ps aux | grep unicorn
root 555 0.0 0.0 4240 992 ? Ss Nov17 0:16 runsvdir -P /opt/gitlab/service log: .........................................................................................................cat: /opt/gitlab/service/unicorn/supervise/pid: No such file or directory control/t: 3: kill: Illegal number: ...................................................................................................................................................................................
git 20729 1.7 10.7 382652 221164 ? Sl 08:15 0:13 unicorn master -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru
git 20752 0.0 10.3 382652 213332 ? Sl 08:15 0:00 unicorn worker[0] -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru
git 20757 0.0 10.3 382652 213204 ? Sl 08:15 0:00 unicorn worker[1] -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru
git 20761 0.0 10.3 382652 213332 ? Sl 08:15 0:00 unicorn worker[2] -D -E production -c /var/opt/gitlab/gitlab-rails/etc/unicorn.rb /opt/gitlab/embedded/service/gitlab-rails/config.ru
git 20766 0.0 0.1 20108 2908 ? Ss 08:15 0:00 /bin/bash /opt/gitlab/embedded/bin/gitlab-unicorn-wrapper
root 21648 0.0 0.0 4088 928 ? Ss Nov18 0:00 runsv unicorn
root 21649 0.0 0.0 4232 988 ? S Nov18 0:00 svlogd -tt /var/log/gitlab/unicorn
zach 21877 0.0 0.1 12724 2284 pts/0 S+ 08:28 0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn unicorn