我发现我的服务器配置有点低。。。装的东西有点多,于是我进行了一次限制内存占用
Gitlab
限制内存:
vim /etc/gitlab/gitlab.rb
/etc/gitlab/gitlab.rb unicorn[‘worker_timeout’] = 60 ###! Minimum worker_processes is 2 at this moment ###! See https://gitlab.com/gitlab-org/gitlab-foss/issues/18771 unicorn[‘worker_processes’] = 2
然后重启
gitlab-ctl reconfigure
然后是jenkins
内存限制
vim /etc/sysconfig/jenkins
JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -XX:MaxPermSize=512m -Djava.awt.headless=true"
重启jenkins
systemctl restart jenkins
然后是tomcat
内存限制
vim /opt/tomcat/bin/catalina.sh
加上
JAVA_OPTS="-Xms256m -Xmx512m -Xss1024K -XX:PermSize=128m -XX:MaxPermSize=256m"
重启tomcat
/opt/tomcat/bin/shutdown.sh
/opt/tomcat/bin/startup.sh