Command was killed with SIGKILL (Forced termination): gatsby clean && gatsby build --prefix-paths

I am facing a build issue, it is failing continuously with the “Command was killed with SIGKILL (Forced termination): gatsby clean && gatsby build --prefix-paths” this message.
Build Log: Netlify App

Guys, any Solutions to resolve this issue?

Thanks in Advance

Hi @Amit_Verma welcome to our forums!

Any particular reason why you’re running gatsby clean prior to running the build? That way you’re not leveraging cache at all and taking a longer path building.

SIGKILL points to memory issues. The instance your build run is limited to 11 GB or RAM and your build may be peaking and failing unexpectibely.

You need to reduce memory usage, we have a Support Guide that may help with that:

Perhaps removing the clean step on your build helps!

Hope this helps!

Hi Gualter

Thanks for the quick reply, the article was beneficial and the issue is resolved on Netlify by adding a GATSBY_CPU_COUNT environment variable, but on localhost, the build is still failing, is there any solution to fix this issue?

I really appreciate any help you can provide.