Excessive Build Times with gatsby-source-shopify During 'source shopify variants' Stage #38817
Open
2 tasks done
Labels
status: triage needed
Issue or pull request that need to be triaged and assigned to a reviewer
type: bug
An issue or pull request relating to a bug in Gatsby
Preliminary Checks
Description
We are experiencing a significant issue with the gatsby-source-shopify plugin in our Gatsby application, specifically during the 'source shopify variants' stage of the build process. This problem is causing excessively long build times, which is severely impacting our development and deployment workflows.
When running our Gatsby build, the 'source shopify products' stage completes relatively quickly (around 34 to 47 seconds for 253 nodes). However, the process slows down during the 'source shopify variants' stage.
In a typical successful build, this stage takes approximately 1777.314 seconds (nearly 30 minutes) to process 645 nodes. This duration is excessively long compared to the rest of the build stages.
Attempts to Resolve:
We initially faced this issue with the following versions: Gatsby 4.25.7, gatsby-source-shopify 7.14.0, and gatsby-source-graphql 4.9.0.
To resolve this, we updated to the latest versions: Gatsby 5.13.1, gatsby-source-shopify 8.13.0, and gatsby-source-graphql 5.13.0. However, the issue persists even after updating.
Configuration Details:
Our configuration for the gatsby-source-shopify plugin in gatsby-config.js is as follows:
Environment:
OS: macOS 14.2.1
CPU: (8) arm64 Apple M2
Node: 20.11.0
Yarn: 1.22.19
npm: 10.2.4
Browsers: Chrome 120.0.6099.234, Safari 17.2.1
This problem was not observed in earlier versions or builds until recently.
Relevant Netlify Logs
11:17:05 PM: success source shopify products - 44.167s - 253 nodes
11:46:43 PM: success source shopify variants - 1777.314s - 645 nodes
11:46:48 PM: success source shopify collections - 5.471s - 112 nodes
11:46:50 PM: success Checking for changed pages - 0.000s
11:46:50 PM: success source and transform nodes - 1829.728s
11:46:51 PM: success building schema - 0.993s
Reproduction Link
https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-source-shopify
Steps to Reproduce
Install the gatsby-source-shopify plugin with the provided configuration.
Attempt to run the development server or build for production.
Expected Result
The server is expected to run quickly, completing the build process within a few minutes.
Actual Result
The build process takes an excessive amount of time, especially during the 'source shopify variants' stage.
Environment
Config Flags
baseRelDir: true
Additional Information:
Netlify Build Logs
Successful Build (Slow):
The text was updated successfully, but these errors were encountered: