Remote builder Out of memory (4GB)

Hi,

I try to build a native image (Java-Spring) using a remote builder and the buildpack
[build]
builder = “paketobuildpacks/builder:tiny”

but during building an image I receive out of memory exception. 4GB of ram exceeded. I know that building native images requires a lot of memory but there is any possibility to increase memory of remote builder to eg. 8GB?

Thanks in advance.

Fly remote builders have a 2GB memory limit, so it would make sense that you’re hitting issues with a large native image. Build packs are huge and slow to generate, so in addition to a memory limit, you might hit a timeout as well if the vm manages to not OOM before that. Have you tried building the image locally with --local-only?

I’ve tried but my case is configured auto deployment from GitHub so --remote-only. What I see Fly remote builders have a 4GB memory limit but it’s still too little :frowning:

Organizations with a paid plan get 8GB builders. If you upgrade, then run fly apps delete <current-builder>, it’ll provision you a better one.

You can also build with any ol’ Docker Daemon, including your local Docker. Just run fly deploy --remote-only.

1 Like