Fork me on GitHub
#graalvm
<
2020-06-09
>
dharrigan14:06:15

I'm eventually getting round to trying to see if I can convert a very small application to run natively. However, I'm observing a huge amount of time to produce and the native image compliation fails with java.lang.OutOfMemoryError: GC overhead limit exceeded

dharrigan14:06:39

Giving the native image maker more gigs...

dharrigan14:06:59

that helped 🙂

avi14:06:43

I recently encountered those issues as well. Have you seen this repo? There are a bunch of useful tips: https://github.com/lread/clj-graal-docs

avi14:06:13

Check out the tip on direct linking

avi14:06:07

And also see if there’s anything you can prune from your dependency tree. I removed core.async and its deps and my compile times (and the ram required) dropped substantially.

borkdude15:06:11

hmm babashka does include core.async but I never noticed a problem with that

1
dharrigan15:06:33

Yes, I'm using the clj-graal-docs as a reference

dharrigan15:06:09

Unfortunately, I've had t ostop, as I'm getting far too many problems with messages such as these io.netty.buffer.AbstractByteBufAllocator the class was requested to be initialized at run time (from the command line). io.netty.buffer.AbstractByteBufAllocator has been initialized without the native-image initialization instrumentation and the stack trace can't be tracked. Try avoiding to initialize the class that caused initialization of io.netty.buffer.AbstractByteBufAllocator

dharrigan15:06:30

(due to 3rd party library dependencies)