51工具盒子

依楼听风雨
笑看云卷云舒,淡观潮起潮落

gitlab、jenkins、tomcat内存限制

我发现我的服务器配置有点低。。。装的东西有点多,于是我进行了一次限制内存占用

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

image-20200728210513469

然后重启

|-----------|------------------------------------------| | 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"

image-20200728210633968

重启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"

image-20200728210933743

重启tomcat

|-------------|--------------------------------------------------------------------------| | 1 2 | hljs shell /opt/tomcat/bin/shutdown.sh /opt/tomcat/bin/startup.sh |

赞(0)
未经允许不得转载:工具盒子 » gitlab、jenkins、tomcat内存限制