Increase Gatsby build time limit

My current build time is 2 hours.I want to increase it to 3 hours For Herb.

Trust @hrishikesh where is my post /\

Thanks for reaching out!

Since a 3-hour build time is at the top end of Netlify’s platform limits, we always like to first review the builds in question to see whether there are any opportunities for additional optimization to get the build times lower.

We spent some time reviewing this recent build and have a few suggestions for the next steps:

  1. It looks like, by far, the longest-running build step comes from sourcing data from WordPress:
12:28:28 AM: success  gatsby-source-wordpress  fetching nodes - 5049.271s - 45286 total

The WordPress source plugin ships with a few options (this one for excluding MediaItem fields, for example) that allow for filtering the data that we’re fetching from the CMS, which ensures we’re only creating the nodes that we need.

It also looks like ~10 minutes are spent on query running, so along with filtering the nodes you’re sourcing from WP; we’d also recommend auditing the queries on the site to ensure that they contain only the necessary fields.

You can use the GATSBY_EXPERIMENTAL_QUERY_CONCURRENCY env var to manipulate how many queries run in parallel, but this comes at a cost to memory consumption and so we recommend using it with caution.

Since there look to be ~22k pages on the site, deferring some of the least frequently accessed pages is also a good option to consider. This lowers the build duration by reducing the number of pages that are generated at build time. Please reach out with any questions!