# Precompilation OOM

**URL:** <https://discourse.julialang.org/t/precompilation-oom/101366>\
**Category:** General Usage\
**Created:** [July 8, 2023, 8:45pm UTC](https://discourse.julialang.org/t/precompilation-oom/101366 "2023-07-08T20:45:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![NAS](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nas/32/47432_2.png) [@NAS](https://discourse.julialang.org/u/NAS)\
**Post date:** [July 8, 2023, 8:45pm UTC](https://discourse.julialang.org/t/precompilation-oom/101366/1 "2023-07-08T20:45:49Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [July 8, 2023, 8:50pm UTC](https://discourse.julialang.org/t/precompilation-oom/101366/2 "2023-07-08T20:50:22Z")

</div>

> [@NAS](#):
>
> can watch the memory slowly be used until I get an OOM error.

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

---

<div class="post-metadata">

**Author:** ![ianshmean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ianshmean/32/216042_2.png) [@ianshmean](https://discourse.julialang.org/u/ianshmean)\
**Post date:** [July 8, 2023, 8:50pm UTC](https://discourse.julialang.org/t/precompilation-oom/101366/3 "2023-07-08T20:50:40Z")

</div>

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](https://docs.julialang.org/en/v1/stdlib/Profile/#Triggered-During-Execution), then interrupt `Pkg.precompile` ~5 seconds later and it should show the profile report from the child process.
