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?
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.
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?
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.
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.