Hi everyone I was wonde…

1 minute read

Hi everyone, I was wondering if anyone has experienced a similar issue as the following: We have an nx mono-repo for our angular project that we recently updated to nx 9 alongside updating to the latest angular 9. We upgraded from 7 -> 8 -> 9. Since then we have found that we run out of memory when we try to run affected:build in parallel, but only in our Azure CI and not locally.

When we remove the parallel flag, it runs fine. We were hoping to enable the parallel flag (with a max parallel flag of 2) however as it greatly shortens build time in the CI. We either seem to get the error: ‘FATAL ERROR: Zone Allocation failed - process out of memory’ or ‘API fatal error handler returned after process out of memory on the background thread’. The node memory flag seems to make no difference here (previously on angular 7 we needed to set max_old_space to 8000). Disabling ivy, and differential loading features in Angular 9 seem to also make no difference. Any help would be appreciated, Thanks

Responses:

I would try setting --maxParallel to a low number

Ahh sorry I forgot to mention - we did set that to 2. I’ll update my post.

What I don’t understand is why this no longer works when changing versions, upping the node memory seems to make little difference whatever I give it.

For node apps i also set maxWorkers to 2

Also, i don’t execute builds in parallel in the CI because i don’t always control the available memory/cpu of the machines

Updated: