Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timeout issue on build #59

Open
TBSTDev opened this issue Feb 4, 2021 · 0 comments
Open

Timeout issue on build #59

TBSTDev opened this issue Feb 4, 2021 · 0 comments

Comments

@TBSTDev
Copy link

TBSTDev commented Feb 4, 2021

Hi,

I'm having issue running "npm run dev".
I'm getting the following error:

timeout of 30000ms exceeded


 ERROR #gatsby-source-wordpress-experimental_111006

 gatsby-source-wordpress  It took too long for http://my-wp-site.com/graphql to respond
(longer than 30 seconds).

Either your URL is wrong, you need to increase server resources, or you need to decrease the amount of resources
each request takes.

You can configure how much resources each request takes by lowering your `options.schema.perPage` value from the
default of 100 nodes per request.
Alternatively you can increase the request timeout by setting a value in milliseconds to `options.schema.timeout`,
 the current setting is 30000.

My gatsby config file w/c is located at
/gatsby-woocommerce-themes/packages/gatsby-woocommerce-theme
has the below config

module.exports = ({ wordPressUrl, gatsbySiteUrl, googleTagManagerId, fbAppId }) => ({
  siteMetadata: {
    title: `Gatsby WooCommerce Theme`,
    description: `Codeytek - Gatsby WooCommerce Theme`,
	siteUrl: gatsbySiteUrl,
	wordPressSiteUrl: wordPressUrl,
    author: `@imranhsayed`,
	fbAppId: fbAppId,
  },
  plugins: [
    {
      resolve: "gatsby-plugin-google-tagmanager",
      options: {
        id: googleTagManagerId,
        includeInDevelopment: false,
      },
    },
    `gatsby-plugin-react-helmet`,
    `gatsby-transformer-sharp`,
    `gatsby-plugin-sharp`,
    `gatsby-plugin-sass`,
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `images`,
        path: `${__dirname}/src/images`,
      },
    },
    {
      resolve: `gatsby-source-wordpress-experimental`,
      options: {
        url: `${wordPressUrl}/graphql`,
        verbose: true,
        develop: {
          nodeUpdateInterval: 3000,
          hardCacheMediaFiles: true,
        },
        production: {
          hardCacheMediaFiles: false,
        },
	schema: {
	  timeout: 60000,
	  perPage: 20,
      	  requestConcurrency: 50, 
          previewRequestConcurrency: 2,
    	},
        debug: {
          graphql: {
            showQueryOnError: false,
            showQueryVarsOnError: true,
            copyQueryOnError: true,
            panicOnError: true,
            // a critical error is a WPGraphQL query that returns an error and no response data. Currently WPGQL will error if we try to access private posts so if this is false it returns a lot of irrelevant errors.
            onlyReportCriticalErrors: true,
          },
        },
        excludeFieldNames: [`blocksJSON`, `saveContent`],
        type: {
          Post: {
            limit:
              process.env.NODE_ENV === `development`
                ? 50 : 5000,
          },
        },
      },
    },
    {
      resolve: "gatsby-plugin-robots-txt",
      options: {
        host: gatsbySiteUrl,
        sitemap: `${gatsbySiteUrl}/sitemap.xml`,
        policy: [{ userAgent: "*", allow: ["/"] }],
      },
    },
    {
      resolve: `gatsby-plugin-manifest`,
      options: {
        name: `Gatsby WooCommerce Theme`,
        short_name: `Electra`,
        start_url: `/`,
        background_color: `#eaeaea`,
        theme_color: `#1e1e1e`,
        display: `standalone`,
        icon: `${__dirname}/src/images/favicon.png`, // For favicon- This path is relative to the root of the site.
      },
    },
    // this (optional) plugin enables Progressive Web App + Offline functionality
    // To learn more, visit: https://gatsby.dev/offline
    `gatsby-plugin-offline`,
  ],
});

Can you please point me to the right direction here.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant