具体来说,为什么修复PermGen OutOfMemoryError问题会有所帮助?
此外,答案的奖励积分指向我关于JVM参数的文档......
我的Jenkins作业内存不足,java.lang.OutOfMemoryError在构建日志中发送消息.但我使用Ubuntu软件包管理器,aptitude或者apt-get安装Jenkins,我不知道在哪里可以改变分配给Jenkins的堆空间量.
我在为Nightly build构建Jenkins时遇到了这个问题.请注意,存储库项目"project1"很大,大约为900MB.请让我知道如何解决这个问题.
Started by user anonymous
Building in workspace C:\Users\user1\.jenkins\jobs\Nightly Build\workspace
Fetching changes from the remote Git repository
Fetching upstream changes from git@github.com:MyOrg/projectgroup/project1
ERROR: Timeout after 10 minutes
FATAL: Failed to fetch from git@github.com:MyOrg/projectgroup/project1
hudson.plugins.git.GitException: Failed to fetch from git@github.com:MyOrg/projectgroup/project1
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:612)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:836)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:861)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1412)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:652)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:557)
at hudson.model.Run.execute(Run.java:1679)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:509)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)
Caused by: hudson.plugins.git.GitException: Command "fetch -t git@github.com:MyOrg/projectgroup/project1 +refs/heads/*:refs/remotes/origin/*" returned status code -1:
stdout:
stderr:
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:981)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:920) …Run Code Online (Sandbox Code Playgroud) 我有詹金斯失败的案例,除了Jenkins重新部署(Jenkins是Tomcat中的webapp)帮助.即使新的工作也因PermGen空间错误而失败,但所有设置都很好(所有这些-XX:PermSize参数都可以).关键在于重新部署后,一切都像魅力一样.但这是一个苛刻的解决方案.我想知道,如果有一些选项可以回滚Jenkins状态.提前致谢.
更新:好的,对于那些可能面临类似问题的人来说,这就是我想到的.这些,是谁写的,它是更好地部署詹金斯作为一个Tomcat模块可能没有面对什么样的项目部署的问题(与詹金斯部署插件或用tomcat-maven-plugin在Maven的pom.xml).当我分别安装Jenkins时,我没有遇到任何问题.呼!
我最近从Jenkins 1.6升级到2.5.在我这样做之后,我注意到CPU使用率非常高,有时超过300%(只有4个内核,所以我认为它不会超过400%).我不知道从哪里开始调试这个,但这里是一个线程转储和顶部/ htop的一些截图
我在 Ubuntu 20.04 LTS 上运行 Jenkins,我想更改端口或 Jenkins 运行的用户,但对 /etc/default/jenkins 文件的更改在重新启动服务后不会更改端口。
该服务仍然启动为:
/usr/bin/java -Djava.awt.headless=true -jar /usr/share/java/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8080
Run Code Online (Sandbox Code Playgroud)
而 /etc/default/jenkins 文件内容如下:
[...]
# port for HTTP connector (default 8080; disable with -1)
HTTP_PORT=8081
# servlet context, important if you want to use apache proxying
PREFIX=/$NAME
# arguments to pass to jenkins.
# full list available from java -jar jenkins.war --help
# --javaHome=$JAVA_HOME
# --httpListenAddress=$HTTP_HOST (default 0.0.0.0)
# --httpPort=$HTTP_PORT (default 8080; disable with -1)
# --httpsPort=$HTTP_PORT
# --argumentsRealm.passwd.$ADMIN_USER=[password]
# --argumentsRealm.roles.$ADMIN_USER=admin
# --webroot=~/.jenkins/war …Run Code Online (Sandbox Code Playgroud) 我在虚拟操作系统上安装了Jenkins.每当我启动Jenkins服务时,物理内存都会达到94%.然后它永远不会减少.所以我的系统变得非常缓慢且没有反应.结果Jenkins网页变得缓慢.我为RAM分配了4GB.有没有办法加快我的机器限制詹金斯的内存使用?
我已经在 Ubuntu VPS 上安装了 Jenkins 并且我正在构建 nodejs,这在某些时候会触发 nginx 中的 502 错误网关并且 Jenkis 服务停止。
构建似乎随机停止,有时在安装 npm 模型时,有时在使用 gulp 等时。
我必须手动重新启动它(sudo service jenkins restart)。
这是构建的控制台输出:
+ jspm -v
0.16.15
Running against local jspm install.
[workspace] $ /bin/sh -xe /tmp/hudson1116016846111302145.sh
+ jspm install
Looking up npm:babel-core
Looking up npm:babel-runtime
Looking up npm:core-js
Updating registry cache...
ok Up to date - babel as npm:babel-core@^5.8.24 (5.8.34)
Looking up github:jspm/nodelibs-fs
Looking up github:jspm/nodelibs-path
Looking up github:jspm/nodelibs-process
Looking up github:systemjs/plugin-json
Looking up npm:process
Looking up npm:path-browserify
Looking …Run Code Online (Sandbox Code Playgroud) 在本地环境中我没有问题,但是使用此脚本在 jenkins 上运行生产环境确实可以:
yarn install --production
yarn build
Run Code Online (Sandbox Code Playgroud)
构建大约需要 5 分钟,最后,jenkins 退出并显示此控制台输出错误:
+ yarn install --production
yarn install v1.9.4
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.2.9: The platform "linux" is incompatible with this module.
info "fsevents@1.2.9" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning " > bootstrap@4.3.1" has unmet peer dependency "jquery@1.9.1 - 3".
warning " > bootstrap@4.3.1" has unmet peer dependency "popper.js@^1.14.7".
warning " > google-maps-react@1.1.11" has incorrect peer dependency …Run Code Online (Sandbox Code Playgroud)