Heap size settings does not take effect on 2023.

Answered

I upgraded IntelliJ from 2021 to 2023. From that I can't build my Java modules, Results was OutOfMemory(Heap size).

Setting Shared build heap size does not have any effect. Watching memory in system I see still small values of used memory.

After installing 2021 is heap size settings again active because compilation finishes and in process is bigger amount of memory used by java compilation process.

Win10(64), JDK 8 IBM

0
23 comments

Hello,

Could you please provide logs folder zipped from both versions after reproducing the issue? You may share files via https://uploads.jetbrains.com/ form.

0

I'm sorry, where are they located?

0

I found it. Sent. Upload id: 2023_08_23_G7fJDxR1FWsippBUoA3MyH (files: log-2021.zip, log-2023.zip)

0

Thanks! I don't see error in the latest runs. Did you build project at those runs? Please attach screenshots from "Settings| Build, Execution, Deployment | Compiler" and "Settings | Build, Execution, Deployment | Compiler | Java Compiler" from both IDEs.

0

Sent screenshots and logs, added Screen after error/succes

aproach in both IDEs

maven reaload all

maven clean

build adis_j(project with modules)

 

Upload ID: 2023_08_24_28KL4osDSAtRhTBvXdrrHL (file: idea.zip)

0

I still couldn't reproduce the issue on my side. Could you please attach screenshots from 

  • File | Settings | Build, Execution, Deployment | Build Tools | Maven | Importing
  • File | Settings | Build, Execution, Deployment | Build Tools | Maven | Runner

as well?

0

Done.

Upload id: 2023_08_25_zgV5nQThFKwpVfB35zfmn8 (file: idea.zip)

0
Can you please try to remove the .idea folder under the project and reopen it? Does it help?
0

It's still the same. I deleted .idea folder.

Then maven reload, clean, and build java (all project), when memory in system view exceeds 700mb (cca 860). -→ OutOfMemory.

I set again from default Settings - Build, exec… - Compiler - Shared build process heap size to 4000.

The same response after 700mb OutOfMemory.

And I can notice my colleague try it as first installation idea (idea 2023) and with the same troubles. 

0

Does it work if you :

* remove the `-Xmx3G` from the maven runner vm option settings 

* configure the 4000 in user-local heap size instead?

0

negative

java: OutOfMemoryError: insufficient memory

0
Can you please try to remove the build cache by closing the IDE and deleting the system directory(C:\Users\schwarz\AppData\Local\JetBrains\IdeaIC2023.2)?

Please attach the zipped log file again if it still remains. 
https://uploads.jetbrains.com/

Thank you,
0

Upload id: 2023_09_04_GxGXUZZh5K87UkRPUXLHEC (file: idea.zip)

done, no effect

Upload id: 2023_09_04_GxGXUZZh5K87UkRPUXLHEC (file: idea.zip)

One pro that has. I found that there is something like compile-server folder and in my case has even 20-30GB. In all idea versions that count more then 100GB. So I found hard disk space glutton. :-)

I'm noticing it's still the same. In 2023 when the process has more then 700m then fail. In 2021 grows up to peek 3200m and finish with success. I think it still works in update 2021 to 2022.3 but no guarantee. :-)

0
Will you be able to share a sample project?
0

I'm sorry. It's not possible. But I think you can find larger project /library on iternet which is not compile able with 700M and simulate that as well. I really see difference in process information. Memory in 2023 is not growing but in 2021 yes.

0
Please try to specify -Dforked.javac.heap.size.mb= in File | Settings | Build, Execution, Deployment | Compiler | build process * VM options field (either shared or user-local, does not matter). Does it help?

From the log I see that this is the forked javac who fails with the OOM, not the build process. IntelliJ build system forks javac with the same heapsize that is configured in `File | Settings | Build, Execution, Deployment | Compiler | build process heap size`.
0

Yes!!! That's it.

From start was build process very speedy so I know that something changed. Process monitor shows growing of used memory and build finish with success.

I have questions. I can of course set that parameter. Or will be send this value from idea(with heap size value)? Is it problem with big project or java manufacturer(ibm)?  Maybe I'm not alone and how is possible it's going in 2021 version?

0
> Maybe I'm not alone and how is possible it's going in 2021 version?

The behavior is that the forked process has the same max heap size as the parent process. If the build process has a big enougth heap, the forked process should have enough memory too. We need to reproduce the problem.
0

I'd like to have link the documentation of that param(forked.javac.heap.size.mb) also. I can't find it.

Thanks a lot

0

Could I know status of this problem. Was reproduced, solved?

Or if have to do something for solution initiation. I have still 2021 version and would like upgrade but I don't feel so comfortable with using that par.

0

I'm afraid not. I still couldn't reproduce the issue.

0

Ok. I can still live with 2021 version.

But, you know, we would really appreciate a shift in the solution. :-)

0

Please sign in to leave a comment.