Cloudflare Pages - Failed: build exceeded memory limit and was terminated

Our Cloudflare Pages builds that we use for deploy previews are failing consistently starting at 2024-02-26T19:25:00.694319Z with the following logs:

2024-02-28T18:55:20.803117Z	Cloning repository...
2024-02-28T18:55:22.497055Z	From
2024-02-28T18:55:22.497921Z	 * branch            abb1a3155d70d20d6f395de0aafc37a17ab8d2ac -> FETCH_HEAD
2024-02-28T18:55:22.721941Z	HEAD is now at abb1a31 [GROWTH-224] Bump platform-ui to 2.0.1
2024-02-28T18:55:22.819853Z	Using v2 root directory strategy
2024-02-28T18:55:22.852541Z	Success: Finished cloning repository files
2024-02-28T19:04:17.502524Z	Failed: build exceeded memory limit and was terminated

Example build IDs
Earliest: 6ae18651-b78e-4189-9aae-f154373d397a
Latest: b9caf76b-76d5-4bb1-88fc-81dbccfdc7da

We previously experienced this symptom on January 10 when Cloudflare rolled out changes and opted us in to an infrastructure upgrade. Is this a similar issue as discussed in this thread?

Thank you for your help.


We also just hit the same. How can we opt out of these upgrades, or even opt in/pay for larger runners?

Started facing this issue from 2024-02-28.
Build IDs

@jhands1 @jfawcett Can you check this?
These are recent failing builds. also tried with --max-old-space-size=3072. which is also failing randomly.

1 Like

All of our builds are failing. Please look into this issue asap

It started from 1-2 days. It was random at first.
Now all the builds are failing.

relevant topics with no resolution

  1. Deployment failed build exceeded memory limit and was terminated - #6 by michael.tran
  2. Pages build failing - #3 by cloonan

Error is following

02:44:25.965 Using v2 root directory strategy
02:44:26.002 Success: Finished cloning repository files
02:50:17.595 Failed: build exceeded memory limit and was terminated

Please help urgently.


I’m also seeing this issue within the same timeframe

1 Like

We’re also experiencing the same issue since about a week. Around 9/10 builds are failing with “Failed: build exceeded memory limit and was terminated”.

Nothing in our repo has changed significantly in sizes.

Some builds:

  • 127b7f23-6baa-43b4-9055-2305f1226123
  • 1de39b50-aa87-4858-a1e6-f6a2a0c40f4b

Would really appreciate a fix.

1 Like

I ran a test to rebuild a build of a commit SHA that was previously successful, before we started seeing these errors, and it is failing with the same error as described above. This test makes me even more suspicious that this is being caused by a change on the Cloudflare side, and not our build.

The following builds were both from the same commit SHA:
Build ID that was successful: ea3e0a56-61d7-4787-bbf3-afe494547360
Build ID that failed: a758d842-c382-42dc-9e88-cbcb2c97296a

1 Like

We often encounter this problem. Here are some build IDs:



Could you please help me?


I added these environment variables to fix this issue.

Hi @jhands1 and @jfawcett ,

Our eng team is still experiencing this issue and it’s blocking our builds. We need to quickly get it addressed. Could you help or readdress to a Cloudflare engineer who can?

Build ID: 2a976edf-e217-47cb-a9bb-25a4c5ee8811

Thank you

1 Like

Build ID: 2b6d97e7-7d13-4458-809d-a3f8ecd02f1a

I tried to build using jekyll with more than 300000 pages and ran into the same error. I have no idea what are the limits of each build.