The JVM could not be started (maximum heap size issue)
I'm receiving the following error when starting the program after running PhpStorm for a while, closing the application and opening up again. AND when the computer has been on for several hours and I start PhpStorm for the first time (i.e. I have restarted the computer since last using). The error is occurring with the current release and the early access program release.
The JVM could not be started. The maximum heap size (-Xmx) might be too large or an antivirus or firewall tool could block the execution.
I have done quite a bit of googling and searching on the forms here. I'm confused. My system is not inadequate. Please see the attached screenshot of my PC overview.
The steps I have taken to rectify the problem:
- Disabled all firewalls and antivirus
- Uninstalled all Java.
- Uninstalled Phpstorm
- Reinstalled only Phpstorm
If I restart the computer, I am able to open Phpstorm. If I start Phpstorm by clicking on `C:\Program Files (x86)\JetBrains\PhpStorm 126.162\bin\PhpStorm.bat` I am also able to start the program BUT I do not like having to keep the command line window open (one more window to clutter things). Obviously, restarting is starting to annoy me.
I love the program and would like to purchase a license once the next version comes out of testing but this issue is really wearing on me.

请先登录再写评论。
Hi Mark,
Reinstalling will not help -- it's the JVM -- the way how memory manager works. JVM needs to allocate memory for Java application (PhpStorm in our case) in single solid block (IIRC). Any libraries that inject themself into process memory will reduce such solid block.
Few possible solutions:
P.S.
Better "official" links:
This is my preferred option, but the extra open command prompt is annoying. Found a workaround. Use the following to launch the .bat file and keep it hidden :)
Create .vbs file and paste code below. Then create a shortcut to file in Startup menu.
Const HIDDEN_WINDOW = 12
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objStartup = objWMIService.Get("Win32_ProcessStartup")
Set objConfig = objStartup.SpawnInstance_
objConfig.ShowWindow = HIDDEN_WINDOW
Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
errReturn = objProcess.Create("C:\Program Files (x86)\JetBrains\PhpStorm 7.1\bin\PhpStorm.bat", null, objConfig, intProcessID)
Decreasing Xmx parameter from 1024 to 512 worked for me !