While trying to build my blog, the build started failing whenever I used my live WordPress site’s graphql endpoint. It resulted in the following error.
error gatsby-source-wordpress Request failed with status code 503 Error occured while fetching nodes of the "xxx" type. 9:20:26 PM: GraphQL request to http://anilmaharjan.com.np/graphql/graphql failed.
It was clear that the site was not letting the parallel traffic. There is no way for me to configure my WordPress site to accept more traffic but to find a way to reduce the parallel requests from the gatsby build.
After going through the source code of
gatsby-source-wordpress plugin, I figured out there is an environment variable called
Setting it to a lower value fixed it, but had to find the perfect number that was just low enough for my WordPress server so that the build tasks doesn’t slow down too much.