Search code examples
javajvmteamcityjvm-arguments

How to pass JVM argument to Teamcity using env variable


I have read the Teamcity documentation and searched on this topic and found that you can pass any JVM arguments to Teamcity on startup by setting an environment variable: TEAMCITY_SERVER_MEM_OPTS

What my problem is - I couldn't find anywhere how to actually set the jvm arguments. Sure, you set them in the TEAMCITY_SERVER_MEM_OPTS env variable, but HOW?

TEAMCITY_SERVER_MEM_OPTS=-Xmx1200m      <- that way?

What about if I want 2 or 3 options, are they separated with commas?

It is probably very obvious, but it's not written anywhere...

edit: I'm running it on linux using an init script that executes the runAll.sh as teamcity user.


Solution

  • You need to pass them with space separated values. For ex

    TEAMCITY_SERVER_MEM_OPTS="-Xmx1200m -Xms256m"