graphql - WordPress woocomerce graphql 失败
问题描述
在将大量产品导入我的 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
}
},
}
解决方案
为 wordpress 分配更多内存解决了这个问题。
将此行添加到 wp.config 文件。
define( ‘WP_MEMORY_LIMIT’, ‘512M’ );
推荐阅读
- amazon-web-services - 如何有条件地扩展 aws asg 实例?
- jquery - 使用 Ajax / Jquery 和 JSON API 加载图像
- c# - 如何使用多个类修复 Json 中的反序列化
- vue.js - 如何让 replaceData 函数工作?
- c# - 有没有办法用 c# 读取像 [Owner="Tester"] 这样的测试属性值
- python - 如何让我的 vscode 终端将我的 venv 用于 python 而不是系统版本?
- python - 使用 Micropython 设置 esp32 接入点 Web 服务器
- html - 从 HTML 创建 PDF 并设置页面大小和边距
- android - 由于 livedata 的变化,如何更改 recyclerview 行的格式?
- javascript - 如何正确显示几个带有地图功能的 Flatlist?