Precompilation OOM

Has anyone had an issue with a project precompilation just running and continuing to consume memory. I have a module I’m working on developing right now and when I Pkg.add it appears to update all of the dependencies and then starts to precompile the project. But the status never progresses and I can watch the memory slowly be used until I get an OOM error.

Any thoughts on what might be the issue?

how large is your RAM? you can try setting JULIA_NUM_PRECOMPILE_TASKS to something smaller

You can interrupt Pkg.precompile and it should show you the interrupt in the process to show what it was doing.

Alternatively if you are using julia 1.9 (recommended) you can figure out the id of the child process and tell it to profile itself, then interrupt Pkg.precompile ~5 seconds later and it should show the profile report from the child process.

1 Like