我发现我的服务器配置有点低。。。装的东西有点多,于是我进行了一次限制内存占用
Gitlab
限制内存:
|-----------|---------------------------------------------|
| 1
| hljs shell vim /etc/gitlab/gitlab.rb
|
/etc/gitlab/gitlab.rb {#etcgitlabgitlabrb}
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
然后重启
|-----------|------------------------------------------|
| 1
| hljs shell gitlab-ctl reconfigure
|
然后是jenkins
内存限制
|-----------|----------------------------------------------|
| 1
| hljs shell vim /etc/sysconfig/jenkins
|
JENKINS_JAVA_OPTIONS="-Djava.awt.headless=true -XX:MaxPermSize=512m -Djava.awt.headless=true"
重启jenkins
|-----------|---------------------------------------------|
| 1
| hljs shell systemctl restart jenkins
|
然后是tomcat
内存限制
|-----------|---------------------------------------------------|
| 1
| hljs shell vim /opt/tomcat/bin/catalina.sh
|
加上
JAVA_OPTS="-Xms256m -Xmx512m -Xss1024K -XX:PermSize=128m -XX:MaxPermSize=256m"
重启tomcat
|-------------|--------------------------------------------------------------------------|
| 1 2
| hljs shell /opt/tomcat/bin/shutdown.sh /opt/tomcat/bin/startup.sh
|