-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unicorn does not come up (error 502) after hard restart of Docker server #1305
Comments
Any progress here? I'm trying to run |
Hello, |
@lucpolak I finally got it working just using a more beefy server. I was trying to run on a |
Hey @asbjornenge, My server is pretty good. The VM is hosted on ESXI with Intel 4c CPU and 32Gb RAM. I have another VM with same config with gitlab-ce installed without docker and all works fine ;-( |
We had the same issue on a DigitalOcean 4-core VPS with 8GB RAM (~30 regular users and a lot of CI pipelines). What helped was reducing the number of unicorn workers from 8 to 6 (using the |
Exact same issue on Synology NAS. Reducing the workers did not solve the issue. |
Is there a workaround like automatically removing the pid file at startup? |
遇到了同样的问题. INFO exited: unicorn (exit status 1; not expected)2018-04-22 06:08:53,643 INFO spawned: 'unicorn' with pid 587 |
I am seeing this same behavior at the moment and can hardly understand how to go about resolving it. I am in the process of deploying gitlab in our on-prem kubernetes cluster. Some googling shows that some people have had success beefing up memory for the running instance. I beefed up pod spec to use up to 4G RAM but that has also been futile. Here is what I am seeing in the log before kubernetes restart the containing as an effort to repair it. In essence, it hangs here:
See these two lines where it dies and look at how long it took for it to stop:
It just sits at this point until the container is restarted by kubernetes. I have also increased |
This solved my issue, thanks :-) |
docker exec -it gitlab rm /home/git/gitlab/tmp/pids/unicorn.pid && docker restart gitlab This solved my issue, thanks :-) -----me too, thanks!!! |
2018년 6월 2일 (토) 오전 11:09, fover0932 <notifications@github.com>님이 작성:
… docker exec -it gitlab rm /home/git/gitlab/tmp/pids/unicorn.pid && docker
restart gitlab
This solved my issue, thanks :-)
-----me too, thanks!!!
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1305 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEzfyNS3nKC5dlYdnxxZX8NRDwxwuiZyks5t4fPcgaJpZM4OkxsJ>
.
|
I'm seeing this issue just now on my GitLab installation on a Synolog NAS. I installed GitLab via Package Center, i.e, I'm using the package provided by Synology which is based on an old version ( Fixed the issue by removing the stale PID file. Thanks! |
Any actual solution rather than a mitigation? Is it just that my docker container doesn't have enough memory assigned or is there something misconfigured? |
In my case, the problem was the fact that I was using wrong signed-SSL certificates, and especially the wrong dhparam.pem certificate |
We experienced a file system full and had to restart GitLab. After restart we also had a error 502. I did: # gitlab-ctl status
run: alertmanager: (pid 551) 1449s; run: log: (pid 545) 1449s
run: gitaly: (pid 593) 1449s; run: log: (pid 589) 1449s
run: gitlab-monitor: (pid 597) 1449s; run: log: (pid 592) 1449s
run: gitlab-pages: (pid 558) 1449s; run: log: (pid 556) 1449s
run: gitlab-workhorse: (pid 553) 1449s; run: log: (pid 548) 1449s
run: logrotate: (pid 596) 1449s; run: log: (pid 591) 1449s
run: nginx: (pid 579) 1449s; run: log: (pid 578) 1449s
run: node-exporter: (pid 552) 1449s; run: log: (pid 547) 1449s
run: postgres-exporter: (pid 563) 1449s; run: log: (pid 560) 1449s
run: postgresql: (pid 561) 1449s; run: log: (pid 557) 1449s
run: prometheus: (pid 594) 1449s; run: log: (pid 590) 1449s
run: redis: (pid 549) 1449s; run: log: (pid 543) 1449s
run: redis-exporter: (pid 550) 1449s; run: log: (pid 544) 1449s
run: registry: (pid 542) 1449s; run: log: (pid 540) 1449s
run: sidekiq: (pid 541) 1449s; run: log: (pid 539) 1449s
run: sshd: (pid 20) 1480s; run: log: (pid 19) 1480s
run: unicorn: (pid 33646) 1s; run: log: (pid 559) 1449s All services were up except unicorn which kept on restarting. I've checked the log files of unicorn and it stated:
So as already mentioned above a simple |
Removing the PID and restarting also solved my issue. @solidnerd @sameersbn Example: #!/bin/bash
#Define cleanup procedure
cleanup() {
echo "Container stopped, performing cleanup..."
}
#Trap SIGTERM
trap 'cleanup' SIGTERM
#Execute a command
"${@}" &
#Wait
wait $!
#Cleanup
cleanup |
Could it be because docker kills the gitlab container before unicorn had enough time to shutdown? |
Same here, this command worked for me but the PID path is different in my case
I've put that in my cron file and it works! |
The 502 problem happens when I stop and then start GitLab from the Synology package manager UI, which I don't consider to be a "hard restart". As such, its a problem every docker GitLab synology deployment is going to have very quickly. Users will have to be lucky enough to find this thread and learn to run a docker command (the This command has to be issued every time the NAS restarts etc. unless they use a cron job fix mentioned, which I'm not sure how to do on a synology - @mgscreativa can you please elaborate? I think this issue is pretty serious and needs a proper fix. |
Hi @abulka sorry I don't have Synology hardware! |
Same here on an EC2 instance booting from a RancherOS AMI. So this is not specific to Synology. This occurred after 12.4.5 (539f5fc0384) |
This issue has been automatically marked as stale because it has not had any activity for the last 60 days. It will be closed if no further activity occurs during the next 7 days. Thank you for your contributions. |
Sorry about this. Does this issue still exists with the newer releases? |
ah i see its present in 12.4.5 too. will make a fix soon |
@sameersbn I think we need to this with puma right by now instead of unicorn. |
Steps to reproduce
Actual result
GitLab will never come up fully, showing error 502.
The docker container logs will have this:
unicorn_stderr.log
will have this:Workaround
The only way to bring up GitLab will be to
docker exec
into the container, manually delete the stale pid file and restart the container:Expected result
GitLab comes up without manual intervention.
The text was updated successfully, but these errors were encountered: