-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exit code 137 even with -Dquarkus.native.native-image-xmx=4G
when building native app
#26196
Comments
Hello @tigerinus , how are you building the native-image? Using a container or on the bare metal? How much physical memory does the system have? Did you try increasing the max heap size as suggested by the error log? |
I simply did
Not sure if it's bare metal or container build, but i did include the heap increase setting as you can see. My laptop is 16GB ram |
4GB of memory is likely not enough. Did you try |
I could try again, but even with quarkus.native.native-image-xmx=4G the build process barely used less than half of 4G.. I was watching the memory usage. |
Java memory management is a very complex, so it's not always easy to determine what the actual memory usage is. Please go ahead and try |
OK - 6G works. Is memory usage proportional to the complexity of the project? My worry is this is such a simple project - my first project to get familiar with Quarkus. It only does simple in-memory CRUD via GraphQL. Wonder how much memory does it need if it's a more complicated real-world app. |
Yes and no :) In general the more code you bring in the more memory it requires to process it and the longer it takes. Note, however, that even if a project appears simple if it's bringing a lot of dependencies it will require significantly more memory and time to compile. |
Describe the bug
Tried to build native app with
But it always complains not enough memory
Noticed that the memory usage does not actually change much, even with
quarkus.native.native-image-xmx=4G
, which indicates that the build process might not see this flag at all.Expected behavior
It builds fine.
Actual behavior
How to Reproduce?
Create a project that uses following dependencies
Output of
uname -a
orver
Linux zb-red 5.15.0-37-generic #39-Ubuntu SMP Wed Jun 1 19:16:45 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Output of
java -version
openjdk version "17.0.3" 2022-04-19 OpenJDK Runtime Environment Temurin-17.0.3+7 (build 17.0.3+7) OpenJDK 64-Bit Server VM Temurin-17.0.3+7 (build 17.0.3+7, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.9.2.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 7.4.2
Additional information
No response
The text was updated successfully, but these errors were encountered: