YouTrack Standalone 2018.1 Help

Configure JVM Options

You can configure the properties and JVM options for your YouTrack instance. The YouTrack properties include various launch configuration settings. The JVM options let you manage behavioral, garbage collection, performance, and debugging options for your server.

For a complete list of YouTrack-specific configuration parameters, see Configuration Parameters.

Mandatory JVM Options

To run YouTrack, the following JVM options are required for all installations:

Setting

JVM Option

Value

Maximum Metaspace memory

-XX:MaxMetaspaceSize250m

Maximum Java heap size

-Xmx

1024m or 1g

The following JVM options are not mandatory, but can improve the performance of your YouTrack installation:

Setting

JVM Option

Value

Minimum Metaspace memory

-XX:MetaspaceSize250m

Set JVM Options for a YouTrack JAR Installation

When you run YouTrack as a stand-alone Java process, set the JVM options in the command that you use to run YouTrack.

java -Xmx1024m -Djava.awt.headless=true -Djetbrains.webr.maxUploadFileSize=50m -jar youtrack-xx.jar <port>

Set JVM Options for MSI and ZIP Installations

For MSI and ZIP installations, you can set JVM options in a command-line interface or manually edit the configuration file.

When you set a YouTrack property or JVM option, the property is applied on every server restart.

Set JVM Options from the Command Line

You can set properties and JVM options for your server with the configure command. You can use this method for both MSI and ZIP installations. To execute these commands in an MSI distribution, open the Command Prompt window as an administrator.

When you set JVM options from the command line, consider the following guidelines:

  • Always execute the configure command on behalf of the OS user that runs the YouTrack service. This command creates configuration files and folders. The Hub service user should have sufficient permissions to access these files and folders.

  • To set the parameter for a JVM option, enter the configure command with the prefix -J. The -J prefix signifies that a JVM option is declared after it. You must add the -J prefix to each JVM option that you want to configure.

  • To define an option that is passed to YouTrack by the JVM on start, use "-":
    youtrack configure -J-<jvm.property>[=<value>]
    For example:
    youtrack configure -J-Dorg.eclipse.jetty.server.Request.maxFormKeys=10000
    youtrack configure -J-Xmx1024m -J-XX:+HeapDumpOnOutOfMemoryError

  • To remove a JVM option, use "+":
    youtrack configure -J+<jvm.property>[=<value>]
    The constructions +option=<value>, +XX:<option>=<value> and +D<property>=<value> remove the corresponding option only if it has exactly the same value.
    For example:
    youtrack configure -J+Dorg.eclipse.jetty.server.Request.maxFormKeys=10000
    The constructions +option, +XX:<option> and +D<property> remove the corresponding option regardless of the value.
    For example:
    youtrack configure -J+ea

To set a JVM option from the command line:

  1. Stop the YouTrack service.

  2. In a command-line interface, enter the configure command. For example:
    <youtrack_home>bin/youtrack.sh configure -J-XX:+HeapDumpOnOutOfMemoryError

  3. Start the YouTrack service.

Set JVM Options Manually

You can configure JVM options manually by editing the youtrack.jvmoptions file. This file is created automatically when you modify the default configuration. The location of the file depends on the distribution type of your Hub installation.

  • For a ZIP distribution, the file is located in the <YouTrack installation directory>/conf directory.

  • For an MSI distribution the file is located in the %programdata%\JetBrains\YouTrack\conf directory.

    You can locate the path to the conf folder in the <YouTrack installation directory>\internal\conf\installation.xml file. The path is written to the property default-appdata-root. For example:

    <default-appdata-root>C:\ProgramData\JetBrains\YouTrack</default-appdata-root>

If you have not changed the JVM options for your server, the directory contains a sample configuration file. The sample configuration file uses the .dist extension and contains a list of default JVM options. If the file you want to edit does not exist:

  • Copy the youtrack.jvmoptions.dist file and save it as youtrack.jvmoptions
    or

  • Create a youtrack.jvmoptions file in this directory and paste the contents of the sample configuration file into it.

You can then edit the contents of the file to configure the JVM options.

To change JVM options in the configuration file:

  1. Stop the YouTrack service.

  2. Open the youtrack.jvmoptions file.

  3. Edit the JVM options directly in the file. To set a pre-defined JVM option, simply uncomment the corresponding line.

  4. Save and close the file.

  5. Start the YouTrack service.

Last modified: 7 March 2019