Inconsistent Build Failures for Next.js App on Netlify - Exited with Signal SIGKILL

Hi everyone,

I’m encountering an inconsistent issue while deploying my Next.js application on Netlify. Occasionally, the build fails with the error message: “Build process exited due to signal SIGKILL.”

Here’s a portion of the error log:

11:05:51 PM: > nx run tangle-dapp:build:production
11:05:53 PM: ⚠ No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
11:05:54 PM:   ▲ Next.js 14.2.6
11:05:54 PM:    Creating an optimized production build ...
11:07:24 PM:  ⚠ Compiled with warnings
11:07:24 PM: ../../node_modules/@webb-tools/wasm-utils/wasm-utils_bg.wasm
11:07:24 PM: The generated code contains 'async/await' because this module is using "asyncWebAssembly".
11:07:24 PM: However, your target environment does not appear to support 'async/await'.
11:07:24 PM: As a result, the code may not run as expected or may cause runtime errors.
...
11:10:29 PM: Build process exited due to signal SIGKILL
11:10:29 PM: NX   Running target build for project tangle-dapp and 13 tasks it depends on failed
11:10:29 PM: Failed tasks:
11:10:29 PM: - tangle-dapp:build:production
11:10:29 PM: Hint: run the command with --verbose for more details.
11:10:30 PM: Failed during stage 'building site': Build script returned non-zero exit code: 2 (https://ntl.fyi/exit-code-2)

The specific issues observed include:

  • The build compiles with warnings regarding async/await usage due to “asyncWebAssembly.”
  • The environment doesn’t seem to support ‘async/await’ properly, potentially leading to runtime errors.
  • The build process gets terminated with a SIGKILL signal during static page generation.

Things I’ve attempted:

  1. Enabled verbose logging for more detailed insights.
  2. Reviewed the documentation about build caching, but have not found a way to significantly impact the SIGKILL occurrence.
  3. Checked the async/await setup for wasm-utils to ensure compatibility.

Has anyone else encountered a similar issue or have insights on mitigating this? Could there be a configuration or environmental setting I am overlooking? Any assistance would be greatly appreciated!

Thanks in advance for your help!

What site is this happening on?

Sorry for the late response, the side ID is: 142a9b5b-7c9a-4157-a9a1-4bef6872b286.

SIGKILL means your build ran out of memory. Try adding the following to your next.config.js:

{
  experimental: {
    cpus: 1
  }
}
1 Like

Thank you, that’s helpful. I’m curious about your source of information. Is there any additional documentation available to learn more about this issue?

Which information are you talking about exactly?

I apologize for the confusion. I’m referring to the issue regarding the following quote:

Is there any document or resource I can refer to for more information about this issue?

I’d recommend taking a look at our two support guides regarding memory allocation: