"Killed" when using forc build, why?

Why does the Killed situation appear when using forc build after the amount of code is large?

____

  Compiled contract "demo" with 6 warnings.
Killed

Can you please share the codebase or minimal reproduction of the error? Also, an output for the fuelup show command from your terminal would be helpful

Hi @Nazeeh21, there was no problem before. As my contract became more complex and the number of lines of code exceeded 1,000, a Killed situation occurred.
I just tried it and it works again. I don’t know why. Does compilation require connecting to some of your official services?

It’s strange, it shouldn’t happen. I will make sure that our team looks at it and see if there’s any issue. meanwhile, it’d be great if you could provide the contract, as it will help us to debug

Hi @Nazeeh21
It will be open sourced in a few days.
Currently still under contract development and testing.

Cool! lmk once you Open source it. would be helpful to our devs to reproduce and debug the issue

Hey @Clara, We had a similar issue in hyperlane compiler had a bug to cause memory usage to spike. It’s fixed in the latest release. so please make sure you are on the latest version of the toolchain, or update to the latest by following this guide :slight_smile:

Thanks, I will try it

I’m also getting “Killed” when forc build compiles, and the error occurred when the codebase got larger and specifically when I have multiple storage read it causes “killed”

Note
I saw a huge spike in both CPU utilization(reaching 100%) and memory usage, which increased by >1GB during compile time.
Temp solution: clearing up memory usage solved it for me.

Versions:
(fuelup v0.26.0)

forc : 0.66.4