This is an internal documentation. There is a good chance you’re looking for something else. See Disclaimer.
If your Idea isn’t running smoothly or becomes unresponsive when you open multiple projects, try increasing memory like this:
Help → Edit Custom VM Options… and then set max. memory higher (-Xmx…). Don’t forget to restart Idea
Failing Maven Import in Idea¶
Check Log File¶
Help → Show log in … and then open
It happens frequently that Maven projects are marked red in IDEA after a Maven import and you have to retry the import multiple times. This often happen because there isn’t enough memory.
Go to File → Settings → Build, Execution, Deployment → Buid Tools → Maven → Importing → VM options for Importer and set -Xmx… higher.
Decrease Number of Parallel Jobs¶
If you physically don’t have enough memory. Consider reducing the number of jobs per CPU.
File → Settings → Build, Execution, Deployment → Buid Tools → Maven → Importing → Thread.
(default 1.5C = 1.5 jobs per CPU)
Out of Physical Memory¶
If the build keeps failing randomly, often because of failures in Gulp or NPM . In particular, if you see
anything about exit code 137 . Then, it’s probably because you ran out-of-memory. Check
dmesg (Linux) for
any message about out of memory. (If there is a large table listing memory usage per process it’s an OOM.)
Consider reducing the number of jobs per CPU to reduce memory usage (e.g. by using
Exceeding the Alloted Memory¶
If you see OutOfMemoryErrors during the build, it’s often because too little memory is allotted to Maven. Consider
increasing the memory limit by setting the environment variable
For instance, by adding this in your
~/.profile (and restarting the terminal):
Alternatively, you can decrease the memory usage by decreasing the number of jobs as described in the previous section.
“Too many open files” During Maven Build¶
With the introduction of Java 11, far more files are opened at once during
mvn build sometimes leading to the
error “Too many open files”. Increase the the max. number of open files in such a case.
Increasing the limit on Linux:
/etc/security/limits.d/open_file_limit.confwith this content:* - nofile 1000000
Log out and in again for this to become effective. Use
ulimit -nto show the current limit.
Should you have trouble increasing the limit, you can try decreasing the number of parallel jobs running
during the build using the
-T flag. For instance, specify
-T3 to run three jobs or specify
to run 0.5 jobs per CPU core.