Adjusting memory resources


Im trying to adjust the memorysettings for TeamCity running on a Debian server.

I added: TEAMCITY_SERVER_MEM_OPTS="-Xmx1024m -XX:MaxPermSize=270m" to /etc/environment and rebooted the server. A printenv outputs: TEAMCITY_SERVER_MEM_OPTS=-Xmx1024m -XX:MaxPermSize=270m

When starts teamcity with teamcity-server.dh start and go to Administration > Diagnostics i see:

JVM arguments:

-Djava.util.logging.config.file=/usr/local/sbin/TeamCity/conf/ -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xmx512m -XX:MaxPermSize=270m -Dteamcity.configuration.path=../conf/ -Dlog4j.configuration=file:/usr/local/sbin/TeamCity/bin/../conf/teamcity-server-log4j.xml -Dteamcity_logs=../logs/ -Djava.awt.headless=true -Djava.endorsed.dirs=/usr/local/sbin/TeamCity/endorsed -Dcatalina.base=/usr/local/sbin/TeamCity -Dcatalina.home=/usr/local/sbin/TeamCity 


I looks like the arguments are not been used. Can anybody help?



Comment actions Permalink

Hi Jacob,

Could you please double check that the environment variables are set for the same user that is used to start TeamCity server?

Comment actions Permalink

It looks like /etc/environment is global. So i should be there.


TeamCIty is running as root.

Comment actions Permalink

Could you please try to add echo command to print TEAMCITY_SERVER_MEM_OPTS variable into the file? Is the correct value printed?


Please sign in to leave a comment.