【问题标题】:Wordpress woocomerce graphql failingWordPress woocommerce graphql 失败
【发布时间】:2021-11-03 12:08:28
【问题描述】:

将大量产品导入我的 WordPress Woocomerce 商店后,GraphQL 开始失败。有谁知道我该如何解决这个问题?

ERROR #gatsby-source-wordpress_111007 

gatsby-source-wordpress  Request failed with status code 500

Your WordPress server is either overloaded or encountered a PHP error.

Enable WordPress debugging by adding the following to your wp-config.php file:

define("WP_DEBUG", true);
define("WP_DEBUG_LOG", true);
define("GRAPHQL_DEBUG", true);

(See https://wordpress.org/support/article/debugging-in-wordpress/ for more info)

Then run another build before checking your WordPress instance's debug.log file for errors.

If you don't see any errors in debug.log:

Try reducing the requestConcurrency for content updates or the previewRequestConcurrency for previews, and/or
reducing the schema.perPage option:

{
  resolve: 'gatsby-source-wordpress',
  options: {
    schema: {
      perPage: 20, // currently set to 100
      requestConcurrency: 5, // currently set to 50
      previewRequestConcurrency: 2, // currently set to 5
    }
  },
}

【问题讨论】:

  • 到目前为止您尝试过什么?您是否按照建议使用了perPagegatsby-source-wordpress 是您的配置还是示例?
  • 这是我的配置,我使用了许多不同的配置,但似乎都没有工作。
  • 你能提供吗? gatsby-source-wordpress 是您的配置还是示例?
  • 无论我在模式中输入什么数字,我仍然会收到错误消息。我认为问题出在其他地方。
  • 嗯,尝试提供一些不明显的信息......比如在数据获取期间[共享]托管规格/限制/cpu/ram使用/统计

标签: graphql gatsby


【解决方案1】:

为 wordpress 分配更多内存解决了这个问题。

将此行添加到 wp.config 文件中。

define( ‘WP_MEMORY_LIMIT’, ‘512M’ );

【讨论】:

    猜你喜欢
    • 2021-11-01
    • 2021-09-23
    • 2019-07-20
    • 2018-08-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-24
    相关资源
    最近更新 更多