Pycharm max heap limit can't change

Answered

I am using Pycharm 2018.2.4. I try to change the memory size using pycharm64.vmoptions, when I restart, the memory indicator stills how 725 as maximum. What is the problem?

I am using Ubuntu 16.04.

8 comments

Hi Jackuct1,

How do you open this file? Help | Edit Custom VM Options (https://intellij-support.jetbrains.com/hc/en-us/articles/206544869-Configuring-JVM-options-and-platform-properties)? You can check idea.log (https://intellij-support.jetbrains.com/hc/articles/207241085) to see if these options were applied from your custom .vmoptions file. If it was, the rest is up to the VM. In case the VM doesn't respect this option, please submit a bug to Oracle.

 

0

I am having the exact same issue. Has there been any progress on this?

About my version:

PyCharm 2018.3.5 (Professional Edition)
Build #PY-183.5912.18, built on February 26, 2019
Licensed to <MyCompany> / Stuart Nelis
Subscription is active until October 8, 2019
JRE: 1.8.0_152-release-1343-b28 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.15.0-47-generic

I've had a look in the log files and I have confirmed my expected config is being used, see this log:

2019-07-24 11:13:21,205 [ 16] INFO - #com.intellij.idea.Main - JVM Args: -Xms128m -Xmx750m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 -ea -Dsun.io.useCanonCaches=false -Djava.net.preferIPv4Stack=true -Djdk.http.auth.tunneling.disabledSchemes= -XX:+HeapDumpOnOutOfMemoryError -XX:-OmitStackTraceInFastThrow -Dawt.useSystemAAFontSettings=lcd -Dsun.java2d.renderer=sun.java2d.marlin.MarlinRenderingEngine -XX:ErrorFile=/home/<MyUserName>/java_error_in_PYCHARM_.log -XX:HeapDumpPath=/home/<MyUserName>/java_error_in_PYCHARM.hprof -Didea.paths.selector=PyCharm2018.3 -Djb.vmOptionsFile=/home/<MyUserName>/local/pycharm/pycharm-2018.3.5/bin/pycharm64.vmoptions -Didea.platform.prefix=Python

With the pertinent line:

/home/<MyUserName>/local/pycharm/pycharm-2018.3.5/bin/pycharm64.vmoptions

I can confirm nm pycharm64.vmoptions has these settings set: -Xms128m -Xmx512m. But when pycham loads I get a memory warning stating that Xmx is set to 750.

Regarding the response:

"In case the VM doesn't respect this option, please submit a bug to Oracle." - It is unreasonable for the user to contact Oracle as the JRE is supplied with Pycharm. The onus is on the developer, not the user, to test their product works with a third party tool.

 

 

0

Hi Stuart, could you please check Xms value in Help | Edit Custom VM Options?

0

Hi Pavel,

I have attached an image of the the VM options and the Memory Settings Dialog, this happens when opening PyCharm so obviously the settings in the pycharm64.vmoptions file are not been used.

I have also confirmed that the Help | Edit Custom VM Options points to my config file:

/home/<MyUserName>/local/pycharm/pycharm-2018.3.5/bin/pycharm64.vmoptions

 

I have inspected this issue a bit further and found something interesting :

Checking the PyCharm logs shows (JVM Args: -Xms128m -Xmx750m ...), which is identical to the Xmx value in the memory dialog. Now the interesting part is if I specify a value in the memory dialog box, say 4096, and click 'save and Restart'. PyCharm reloads and I do not get a memory warning, and it runs smoothly - opposed to when the memory warning shows, where PyCharm is laggy.

If I now inspect the logs I they show (JVM Args: -Xms1024m -Xmx4096m ...). So now the Xms value in conf file is used and the Xmx value I specified is used. These have been passed directed to the JRE. Also in my pycharm64.vmoptions Xmx value is updated to -Xmx4096m.

However, after exiting and restarting, I am back at square one: Memory warning showing -Xmx at 750MB and the log file showing (JVM Args: -Xms128m -Xmx750m)

 

I have very little experience with java but it appears that the intention was to pass the custom options to java using the -Djb.vmOptionsFile= argument but this appears to either not work or it is masked by the by -Xms and -Xms arguments in addition.

0

I see, do you have ~/.PyCharm2018.3/config/pycharm64.vmoptions file?

0

I do not have a conf folder in my PyCharm install. 

However this file is at

pycharm-2018.3.5/bin/pycharm64.vmoptions

 

I had already modified this file to see if it fixes the problem. I doesn't. Here are the modified variable values:

-Xms1024m
-Xmx2048m

0

This is not an installation folder but a settings one. PyCharm stores settings separately from the main installation, by default in the user home folder (on Linux), .e.g ~/.PyCharm2018.3, ~/.PyCharm2019.1 and so on (note a leading dot).

0

Sorry I do apologise - I misread the file path in your comment.

Yes I do have the pycharm64.vmoptions at that location. This is the same file shown in the editor when I use Help -> Edit Custom VM Options

0

Please sign in to leave a comment.