Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ Idea 2016 memory problems on OSX

I just updated to Idea 2016.3.2. And keep getting this error.

There is not enough memory to perform the requested operation. Please increase 'Xmx' setting and restart the IDE for change to take effect.

enter image description here

The last thing i did was to increase the Xmx memory option to 2048 in the idea.vmoptions file (as instructed by this answer How to increase IDE memory limit in IntelliJ IDEA on Mac?)

But it keeps runing out of memory still.

Does anyone know what I need to do?

... after looking into it some more it now seems to me like it's a git process that causes the memory failure. initiated when I open a git managed project. enter image description here

Excerp from log:

java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:3332) at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124) at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448) at java.lang.StringBuilder.append(StringBuilder.java:136) at git4idea.history.GitHistoryUtils$2.onLineAvailable(GitHistoryUtils.java:579) at sun.reflect.GeneratedMethodAccessor129.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.util.EventDispatcher.dispatch(EventDispatcher.java:99) at com.intellij.util.EventDispatcher.access$200(EventDispatcher.java:35) at com.intellij.util.EventDispatcher$2.invoke(EventDispatcher.java:79) at com.sun.proxy.$Proxy123.onLineAvailable(Unknown Source) at git4idea.commands.GitLineHandler.notifyLine(GitLineHandler.java:144) at git4idea.commands.GitLineHandler.notifyLines(GitLineHandler.java:106) at git4idea.commands.GitLineHandler.onTextAvailable(GitLineHandler.java:74) at git4idea.commands.GitTextHandler$1.onTextAvailable(GitTextHandler.java:90) at sun.reflect.GeneratedMethodAccessor72.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.execution.process.ProcessHandler$4.invoke(ProcessHandler.java:226) at com.sun.proxy.$Proxy16.onTextAvailable(Unknown Source) at com.intellij.execution.process.ProcessHandler.notifyTextAvailable(ProcessHandler.java:200) at com.intellij.execution.process.BaseOSProcessHandler$SimpleOutputReader.onTextAvailable(BaseOSProcessHandler.java:290) at com.intellij.util.io.BaseOutputReader.sendText(BaseOutputReader.java:202) at com.intellij.util.io.BaseOutputReader.processInput(BaseOutputReader.java:186) at com.intellij.util.io.BaseOutputReader.readAvailableBlocking(BaseOutputReader.java:140) at com.intellij.util.io.BaseDataReader.readAvailable(BaseDataReader.java:82) at com.intellij.util.io.BaseDataReader.doRun(BaseDataReader.java:160) at com.intellij.util.io.BaseDataReader$1.run(BaseDataReader.java:61) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 2017-01-04 10:16:01,967 [ 393766] ERROR - .intellij.util.EventDispatcher - IntelliJ IDEA 2016.3.2 Build IU-163.10154.41 2017-01-04 10:16:01,967 [ 393766] ERROR - .intellij.util.EventDispatcher - JDK: 1.8.0_112-release 2017-01-04 10:16:01,967 [ 393766] ERROR - .intellij.util.EventDispatcher - VM: OpenJDK 64-Bit Server VM 2017-01-04 10:16:01,967 [ 393766] ERROR - .intellij.util.EventDispatcher - Vendor: JetBrains s.r.o 2017-01-04 10:16:01,967 [ 393766] ERROR - .intellij.util.EventDispatcher - OS: Mac OS X 2017-01-04 10:16:01,971 [ 393770] ERROR - .intellij.util.EventDispatcher - Last Action: EditCustomVmOptions 2017-01-04 10:16:03,231 [ 395030] ERROR - .intellij.util.EventDispatcher - Java heap space

like image 390
Manolo Avatar asked Jan 04 '17 08:01

Manolo


People also ask

How do I resolve memory issues in IntelliJ?

From the main menu, select Help | Change Memory Settings. Set the necessary amount of memory that you want to allocate and click Save and Restart.

Does IntelliJ use a lot of memory?

I have a Macbook Pro with M1 processor, and it extremely laggy, when I open a Java class, it takes a couple of seconds to load. Sometimes it is using up to 6-7 GB of RAM. It makes it virtually impossible to write any code or to run any application.

How does IntelliJ analyze memory usage?

Open CPU and memory live chartsFrom the main menu, select View | Tool Windows | Profiler. Right-click the necessary process in the Profiler tool window and select CPU and Memory Live Charts. A new tab opens in which you can see the amount of resources the selected process consumes.

How do I change the XMX option in IntelliJ IDEA?

For previous versions or if the IDE crashes, you can change the value of the -Xmx option manually as described in JVM options. IntelliJ IDEA also warns you if the amount of free heap memory after a garbage collection is less than 5% of the maximum heap size: Click Configure to increase the amount of memory allocated by the JVM.

How to allocate more memory in IntelliJ IDEA?

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 and restarts IntelliJ IDEA with the new setting. The Change Memory Settings action is available starting from IntelliJ IDEA version 2019.2.

How do I increase the memory heap in IntelliJ?

Increase memory heap. The Java Virtual Machine (JVM) running IntelliJ IDEA 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. From the main menu, select .

How do I report a performance problem with my IntelliJ IDE?

This article is dedicated to reporting performance problems with IntelliJ IDEs and related information to JetBrains support. You can submit a support request via Help menu in your IDE or via Submit a Request button at the top of this page.


1 Answers

Found the solution: Add this to custom properties (via the help menu; edit custom properties)

vcs.log.index.git=off

That way Idea doesnt attempt to index your entire repo and

like image 156
Manolo Avatar answered Oct 20 '22 01:10

Manolo