quarkus: Improve native image build error message
Building a native image with graalvm ce rc11 & rc12, I occasionally see the following error;
Error: Image building with exit status 137
This occurs if the system runs out of ram (including free swap pages) and the OOM Killer terminates the native image build process.
The error message seen by users is not very informative. Could we capture the exit code of the native-image process, and if equal to 137, display a more helpful message to users?
About this issue
- Original URL
- State: open
- Created 5 years ago
- Reactions: 9
- Comments: 15 (3 by maintainers)
I fixed the issue by increasing the memory allocated to my docker engine. I was using Docker Desktop, so its a configuration, I did in the application
You really need to improve memory usage on this build process, I had to set 10GB !!! in Windows Docker desktop to successfully built very basic app, as it failed with 8GB.
Same issue here but with both Micronaut and Quarkus. Maybe we need to create an issue towards GraalVM itself?
LOL I got this error a minute ago. I thought it was a joke. Reminds me of Hitchhiker’s guide to the galaxy and the answer to the ultimate question.
Setting
-Dquarkus.native.native-image-xmx=8g
and Docker RAM memory = 8g (Docker App -> Preferences) worked for me.I get the same error with Spring Native 0.9.0, just created using start.spring.io:
java --version
:Output of
mvn spring-boot:build-image
:Where to put
-J-Xmx10G -J-Xms5G
?