GoLand 2024.1 Help

High memory consumption

The Java Virtual Machine (JVM) running GoLand allocates some predefined amount of memory. The default value depends on the platform. If you are experiencing slowdowns, you may want to increase the memory heap.

  1. In the main menu, go to Help | Change Memory Settings.

  2. Set the necessary amount of memory that you want to allocate and click Save and Restart.

This action changes the value of the -Xmx option used by the JVM to run GoLand. Restart GoLand for the new setting to take effect.

GoLand also warns you if the amount of free heap memory after a garbage collection is less than 5% of the maximum heap size:

The Low Memory warning

Click Configure to increase the amount of memory allocated by the JVM. If you are not sure what would be a good value, use the one suggested by GoLand.

The Memory Settings dialog

Click Save and Restart and wait for GoLand to restart with the new memory heap setting.

If these settings do not fix the problem, capture a memory snapshot, and send it to the JetBrains support team.

Capture a memory snapshot

  • Click Help | Diagnostic Tools | Capture Memory Snapshot.

    Alternatively, press Ctrl+Shift+A, type capture memory, and select Capture Memory Snapshot.

    Wait until the HPROF snapshot is built. You can navigate to it from the notification balloon.

    capture memory snapshots automatically

You can capture memory snapshots automatically when the IDE runs out of memory.

Capture memory snapshots automatically

  1. Click Help | Edit Custom VM Options.

  2. In the VMOPTIONS file, add the following lines:

    -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=$USER_HOME/java_error_in_goland.hprof

    According to the HeapDumpPath parameter, the HPROF file will be created in the user directory. Alternatively, specify any other directory that has read-write access.

    capture memory snapshots automatically
Last modified: 11 February 2024