【发布时间】:2023-03-28 18:43:01
【问题描述】:
我在尝试调用 gatsby develop 时遇到以下错误。
ERROR #gatsby-source-wordpress-experimental_111007
gatsby-source-wordpress Your wordpress server at http://localwp/graphql appears to be overloaded.
Try reducing the requestConcurrency for content updates or the previewRequestConcurrency for previews:
{
resolve: 'gatsby-source-wordpress-experimental',
options: {
schema: {
requestConcurrency: 5, // currently set to 5
previewRequestConcurrency: 2, // currently set to 2
}
},
}
The GATSBY_CONCURRENT_REQUEST environment variable is no longer used to control concurrency.
If you were previously using that, you'll need to use the settings above instead.
我尝试按照建议设置 requestConcurrency: 5 和 previewRequestConcurrency: 2 但这还不够。
我在出现错误之前所做的可能相关的事情:
- 我今天更新了
WPGraphQL插件(v1.1.1)(我尝试降级到v1.1.0,但问题仍然存在) - 我将
useGatsbyImage(在 gatsby-config.js 中的 'gatsby-source-wordpress-experimental' 选项中)设置为 false 以进行一些测试。
Wordpress 上使用的插件有:WP Gatsby (v0.9.1)、WP GraphQL (v1.1.0)、WP GraphQL Gutenberg (v0.3.5)。
我正在运行一个本地 wordpress 服务器(通过本地),它似乎工作正常。
[已解决]:我禁用了 WP GraphQL Gutenberg (v0.3.5),它又开始工作了。看起来这个插件可能会使 wordpress 服务器过载。
【问题讨论】:
-
您是否尝试过为
requestConcurrency使用较低的值? -
嗨,费兰!是的,我尝试为两者设置值 1。我期待看看这是否是本地服务器的问题。
-
我禁用了
WP GraphQL Gutenberg (v0.3.5),它又开始工作了。这个插件可能会使 wordpress 服务器超载。
标签: wordpress gatsby gatsby-image wp-graphql