Sudden 12+ minute spike in build times

Hi there. Our dev team experienced a sudden spike in build times starting May 13, 2022. Gatsby build times were in the 4-5 minute range, and then spiked to 17-20+ minutes thereafter, seemingly randomly. Builds that exceed 20 minutes are now failing due to timing out. Our app name is pegasusntid.

This occurred across multiple branch deploys (which were performing fine), so we have concluded it is likely not something we changed that is causing the issue.

The builds seem to be taking extra long during the actual build command, but only on Netlify’s servers. When running locally, our devs are seeing build times of 153s (2:33 min).

Your help would be much appreciated. Thanks.
-Justin

Update- Can you increase our build timeout to 30 minutes as a workaround?

hi there justin,

we have upped you to 30 mins so hopefully you can get a build going.

did your content change dramatically? any changes to your dependencies in your package.json?

Not really, our webapp have been continuously been updated and there are no changes since last month in our package.json

Are you talking about the same site that the first post has mentioned?

yes, it is the same site as the first post mentioned

Thank you, I appreciate that. As of Friday our build times are still crazy high (25+ minutes) but we can at least get builds going in the mean time with the new 30 minute limit.

It seems unrelated to anything we’ve added recently. Will keep you posted on build times this week.

1 Like

Any update? our build times are still 15 to 30 minutes

Hey all,

We’ve filed this for the engineers to take a look at and explain what could be happening. We’d let you know as things follow.

Hello @shareefalis and sorry for the late reply on this one.

We have made some improvements on the way we cache artifacts on build. Our team also suggests that you use the latest version of plugin-gatsby despite not being officially supported if you’re using Gatsby < 3

@netlify/plugin-gatsby@1.0.3: latest version is 3.2.1

Can you manually set the version to 3.2.1 and give it a go?

Thanks!

Hi Folks,

We discovered a fix for this isuue.

We had an install module part of the “npm run build”. We were switching between development local build for development/debugging part of a library and npm for ease of development of said library. So, what happened we had a script if it is detected that you were in a development path, it will switch over to npm module variant which triggers a removal of the development path and install library via npm before starting the Gatsby build. It was fine for a while, in mid May, Netlify changed something during that time which caused build time to skyrocket from 3 minutes to 25 minutes. So, we removed it and build time have gone back to 3 minutes.

Shareef

Thanks for letting us know you found a workaround! If you start having issues again, we’ll be curious to know if Gualter’s suggestion to update the plugin helps.

I don’t think it helped but we updated it anyways