Errors running TeamCity on low memory computer
I'm trying to run TeamCity on a micro Amazon EC2 instance (~700MB of memory). I've already reduced the -Xmx switch value for TeamCity itself so that it runs on 256MB of RAM instead of 512MB. But now I get lots of VCS errors from the web site because apparently the git plugin is trying to spawn a java process with 512MB of RAM. I don't know where the -Xmx switch is for the git plugin. Can anyone help?
Actual error:
jetbrains.buildServer.vcs.VcsException: 'git fetch' command failed.
stderr: JVMJ9VM015W Initialization error for library j9gc24(2): Failed to instantiate heap; 512M requested
Could not create the Java virtual machine.
at jetbrains.buildServer.buildTriggers.vcs.git.CommandLineUtil.getCommandLineError(CommandLineUtil.java:41)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.fetchBranchDataInSeparateProcess(GitVcsSupport.java:1124)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.fetch(GitVcsSupport.java:1017)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.fetchBranchData(GitVcsSupport.java:1000)
at jetbrains.buildServer.buildTriggers.vcs.git.GitVcsSupport.getCurrentVersion(GitVcsSupport.java:946)
at jetbrains.buildServer.buildTriggers.vcs.VcsChangesLoader.getCurrentVersion(VcsChangesLoader.java:174)
at jetbrains.buildServer.vcs.impl.VcsManagerImpl.getVersionsForAllRoots(VcsManagerImpl.java:530)
at jetbrains.buildServer.vcs.impl.VcsManagerImpl.loadChanges(VcsManagerImpl.java:664)
at jetbrains.buildServer.serverSide.impl.auth.SecuredVcsManager.loadChanges(SecuredVcsManager.java:46)
at jetbrains.buildServer.serverSide.impl.VcsModificationChecker$1.run(VcsModificationChecker.java:11)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:453)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:315)
at java.util.concurrent.FutureTask.run(FutureTask.java:150)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:898)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:920)
at java.lang.Thread.run(Thread.java:736)
Please sign in to leave a comment.
Hello Andrew,
you can specify -Xmx option for git plugin using internal property teamcity.git.fetch.process.max.memory. By default it is set to 512Mb.
This and other options for git plugin are described on git plugin page.
Thanks for the tip, Dmitry. I was able to get it to work by specifying teamcity.git.fetch.separate.process=false in the .BuildServer/config/internal.properties file.
If I may suggest, the http://confluence.jetbrains.net/display/TCD6/Configuring+TeamCity+Server+Startup+Properties page may benefit from some more concrete examples of how to set these properties.
Anyway, just a suggestion. Thanks for your help.
Andrew, thank you for your suggestion, I will update a documentation.