CentOS intellij heap size, Java heap space

Answered

Hey 
I have created a program using intellij `Spring Boot project` using `Gradle` on my windows machine and it works fine.
but when tried the same program on my CentOS machine, I got `GC overhead limit exceeded`
I tried increasing the heap from the configuration to ` -Xmx2048m` I got this error Java Heap Space - OutOfMemoryException

I tried increasing it by this way
and I got the first error.

I tried copying the setting and .vmoptions from my intellij on windows and still I always get one of the 2 errors

any recommendations or missing steps I need to do?

0
11 comments

Hello,

Am I got you right that you run IDE on CentOS and got errors while running applications? Is it possible to share idea.log ("Help | Show Log in...") from both machines after restarting IDE and reproducing the issue?

0
Avatar
Permanently deleted user

Hello Mr. Yaroslav

Thank you for replying, I really appreciate it.

Yes you are right, I run IDE on CentOS and got errors while running applications, while it is fine in my Windows

I have follow your instructions 
1- restarted IDE in both CentOS and Windows
2- I have called only the command where the issue is happening in my CentOS
3- I have cleared the copied idea.log from both so only today's logs are there "I hope this is not an issue"

I have uploaded both in the link
https://drive.google.com/open?id=1rMSRspncIrL2BImq1Uvo2x26l8TlLXC1 

Waiting for your feedback
Thanks

0

Please check that the same options are selected on "Settings | Build, Execution, Deployment | Build Tools | Gradle" page. Looks like gradle is used to build/run project on CentOS while on Windows IDE is used.

1
Avatar
Permanently deleted user

I have tried switching build/run project on my Windows to Gradle and my CentOS to IDE

I still get the same output in both machines, Windows working fine, and CentOS I got `GC overhead limit exceeded`

`I did Rebuild the Project after switching and I have repeated the previous step to generate the idea log`
I have updated the contents, I have attached the log after switching 
https://drive.google.com/open?id=1n1OuCzV8VkWW9dwCi0UUlzRN2vsDVhGU

Thank you for trying to help me, but still it is not solved yet.

0

What exact JDK version is used on CentOS? Do you face the same issue if you start application using Gradle in command line?

0
Avatar
Permanently deleted user

In both machines I use Java 1.8.0_161 (JDK 8u161)

Yeah, when I run the project using `gradle bootrun` I get the same error.

0

So, it looks like some environment issue. Have you checked RAM on CentOS?

0
Avatar
Permanently deleted user

This is the peak of the readings in my CentOS
The RAM Never exceeded this

0

What Gradle version do you use? Please try to add this to your "gradle.properties" file:

org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=4096m -XX:+HeapDumpOnOutOfMemoryError
0
Avatar
Permanently deleted user

Hey Mr Yaroslave

I am using 'gradle-wrapper.properties' file, supposedly means the latest version of gradle.

I have added this line in my "gradle.properties" file as you have requested
after rerun my Gradle in command line I got the same error

```json
{
   "status_code": "BAD_REQUEST",
   "message_type": "COMMON_EXCEPTION_SERVICE_ERROR",
   "title": "service_error",
   "errors": [
      "Handler dispatch failed; nested exception is java.lang.OutOfMemoryError: GC overhead limit exceeded"
   ]
}
```

to be more precise 
I am using org.apache.poi.ss

to generate and save an excel file
it reaches the last step before returning the generated file 

workbook.write(excelFile);

then it returns this exception

for very small reports it works fine, for large reports this happens

0

Please try to add

-XX:-UseGCOverheadLimit

to "gradle.properties"

Also please check this thread for possible solutions: https://stackoverflow.com/questions/4897766/processing-large-xlsx-file

0

Please sign in to leave a comment.