graphql 无法将 100 多种产品添加到我的 Wordpress Woocommerce 商店

     2023-03-08     113

关键词:

【中文标题】graphql 无法将 100 多种产品添加到我的 Wordpress Woocommerce 商店【英文标题】:graphql fails at adiing 100+ products to my Wordpress Woocomerce store 【发布时间】:2021-11-15 07:17:30 【问题描述】:

有人知道如何解决这个 graphql 错误吗?我不能向我的商店添加超过 50 件商品。 我在选项架构options: schema: timeout: 1000000,, 中提出了超时并将这一行添加到 wp.config 文件define( ‘WP_MEMORY_LIMIT’, ‘512M’ ); 但它没有解决问题。我的上限是 46 件,但我想这不是限制。

info  gatsby-source-wordpress  GraphQL vars: "first":70,"url":"http://my-web-url/graphql","after":null
error  gatsby-source-wordpress  Your wordpress server at http://my-web-url/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 undefined
      previewRequestConcurrency: 2, // currently set to undefined
    
  ,

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.
not finished source and transform nodes - 5.466s
not finished  gatsby-source-wordpress  fetching nodes - 5.390s - 15 total
not finished  gatsby-source-wordpress  PaColor - 3.871s
not finished Downloading remote files - 3.569s
not finished Generating image thumbnails - 3.428s
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /node14/bin/node
Arguments: /vercel/.yarn/lib/cli.js build
Directory: /vercel/path0/site
Output:
info Visit https://yarnpkg.com/en/docs/cli/workspace for documentation about this command.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! gatsby-woocommerce-themes@2.0.1 build: `yarn workspace site build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the gatsby-woocommerce-themes@2.0.1 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /vercel/.npm/_logs/2021-09-21T17_39_01_248Z-debug.log
Error: Command "npm run build" exited with 1

【问题讨论】:

【参考方案1】:

嗯,这很简单。您已经达到了超时/过载响应,这不仅是因为页面数量,还因为它的内容和重量。使用提供的解决方案:


  resolve: 'gatsby-source-wordpress',
  options: 
    schema: 
      requestConcurrency: 50, 
      previewRequestConcurrency: 50, 
    
  ,

并按照文档的建议使用 requestConcurrencypreviewRequestConcurrency 值。使用之前的值 (50) 应该可以工作,因为现在设置为 undefined,所以您应该会看到一些改进。

如果您使用GATSBY_CONCURRENT_REQUEST 环境变量,请注意以下声明:

GATSBY_CONCURRENT_REQUEST 环境变量不再使用 来控制并发。如果您以前使用过它,则需要 改为使用上述设置。

【讨论】:

我的 Gatsby GraphQL 架构不会使用新的 Sanity 架构进行更新

】我的GatsbyGraphQL架构不会使用新的Sanity架构进行更新【英文标题】:MyGatsbyGraphQLschemawontupdatewithnewSanityschema【发布时间】:2020-03-0221:55:12【问题描述】:我正在尝试更新我的CMS以启用用户定义的产品滑块。将相关架构添加到我的... 查看详情

无法将子视图添加到我的 UIView

】无法将子视图添加到我的UIView【英文标题】:NotabletoaddsubviewtomyUIView【发布时间】:2013-04-2315:41:52【问题描述】:我在屏幕上有一个UIView元素。它通过IBOutletradioButtonGroupView连接。我正在尝试向该元素添加一个子视图,但它不起... 查看详情

将核心数据添加到我的项目时无法添加 sql 文件

】将核心数据添加到我的项目时无法添加sql文件【英文标题】:can\'taddsqlfilewhileaddingcoredatatomyproject【发布时间】:2012-10-2512:00:16【问题描述】:我一直在尝试将CoreData添加到我现有的iOS项目中。我没有现有的sql数据库,但我创建... 查看详情

无法将图表添加到我的 vue 组件

】无法将图表添加到我的vue组件【英文标题】:Unabletoaddacharttomyvuecomponent【发布时间】:2020-02-1721:33:14【问题描述】:我有一个vue.js2.0应用,我需要发布第一个顶点图表示例:https://apexcharts.com/docs/vue-charts/目前,我的应用程序没... 查看详情

无法将 Kotlin Android 扩展添加到我的项目

】无法将KotlinAndroid扩展添加到我的项目【英文标题】:UnabletoaddKotlinAndroidExtensionstomyproject【发布时间】:2018-01-0603:18:22【问题描述】:当我尝试通过以下方式添加kotlin-android-extensions时:applyplugin:\'kotlin-android-extensions\'我的项目An... 查看详情

无法将移动应用跟踪绑定添加到我的项目

】无法将移动应用跟踪绑定添加到我的项目【英文标题】:Can\'taddtheMobileAppsTrackingbindingstomyproject【发布时间】:2015-05-1704:25:07【问题描述】:我正在尝试在我的项目中使用MAT绑定,但似乎.jar文件不包含在:http://libgdx.badlogicgames.... 查看详情

无法将 Gradle 依赖项添加到我的 Codename One 项目

】无法将Gradle依赖项添加到我的CodenameOne项目【英文标题】:CannotaddGradledependenciestomyCodenameOneProject【发布时间】:2019-02-1021:12:38【问题描述】:我正在使用CodenameOne使用Netbeans构建一个简单的在线应用程序,我想使用Ably进行互联... 查看详情

如何在graphql中将装饰器添加到args参数

】如何在graphql中将装饰器添加到args参数【英文标题】:Howtoadddecoratortoargsparamingraphql【发布时间】:2021-12-2419:44:45【问题描述】:无法将装饰器@IsUUID()从class-validator添加到我的参数productI,我不想使用额外的dto。如何解决?@UseGua... 查看详情

无法将没有可可豆荚的 Google Analytics iOS SDK 添加到我的项目中

】无法将没有可可豆荚的GoogleAnalyticsiOSSDK添加到我的项目中【英文标题】:Can\'taddGoogleAnalyticsiOSSDKwithoutcocoapodstomyproject【发布时间】:2015-08-2323:29:49【问题描述】:我想将GoogleAnalyticsiOSSDK添加到我的项目中,但很遗憾它不起作用... 查看详情

如何让 Redux Thunk 和 Apollo GraphQL 协同工作

】如何让ReduxThunk和ApolloGraphQL协同工作【英文标题】:HowtomakeReduxThunkandApolloGraphQLworktogether【发布时间】:2017-08-1915:58:35【问题描述】:在我的项目中,ReduxThunk用于将所有异步函数保存在动作创建器中。现在我正在尝试将ApolloGrap... 查看详情

如何将变量添加到 GraphQL 文件查询

】如何将变量添加到GraphQL文件查询【英文标题】:HowdoIaddvariablestoaGraphQLFilequery【发布时间】:2019-12-1712:50:03【问题描述】:我正在使用gatsby-image插件在我的Gatsby网站上显示图像。在我的GraphQL查询中,我希望能够将一个变量传递... 查看详情

无法将 Access-Control-Allow-Origin 添加到我的 WCF 库项目

】无法将Access-Control-Allow-Origin添加到我的WCF库项目【英文标题】:CouldnotaddAccess-Control-Allow-OrigintomyWCFlibraryProject【发布时间】:2012-06-0110:10:16【问题描述】:我试图理解为什么这个调用的ajax不起作用$.ajax(type:\'GET\',url:"http://localho... 查看详情

完整性约束违规:1452 无法将子行添加或更新到我的数据库中

】完整性约束违规:1452无法将子行添加或更新到我的数据库中【英文标题】:Integrityconstraintviolation:1452CannotaddorupdateachildrowintomyDatabase【发布时间】:2017-04-2110:33:46【问题描述】:我在将子行插入数据库时​​遇到问题。总是会... 查看详情

无法在 jest vue 中导入 graphql 查询文件

】无法在jestvue中导入graphql查询文件【英文标题】:cannotimportgraphqlqueryfilesinjestvue【发布时间】:2021-03-1521:14:11【问题描述】:我将单元测试添加到我的Nuxt/Vue项目中,并且我正在使用Jest进行单元测试,我正在使用Apollo客户端从... 查看详情

带有输入类型的 GraphQL Apollo 变异

】带有输入类型的GraphQLApollo变异【英文标题】:GraphQLApolloMutationwithInputType【发布时间】:2019-05-1309:05:11【问题描述】:我想将类型任务添加到我的里程碑,但我无法弄清楚我的查询的语法:这是我的架构:typeMilestone_id:String!titl... 查看详情

我无法将 Application Insight 遥测添加到我的 asp.net 核心控制台应用程序

】我无法将ApplicationInsight遥测添加到我的asp.net核心控制台应用程序【英文标题】:Ican\'taddApplicationInsighttelemetrytomyasp.netcoreconsoleapplication【发布时间】:2022-01-0504:05:50【问题描述】:我在.NET6上有一个控制台应用程序。我尝试登... 查看详情

GraphQL - 将 ObjectType 传递给参数

】GraphQL-将ObjectType传递给参数【英文标题】:GraphQL-passinganObjectTypeaparameter【发布时间】:2017-01-0207:50:28【问题描述】:我正在使用GraphQL,它运行良好,但是,我似乎无法弄清楚如何将参数传递到我的EventGraphQLObjectType的fields部分... 查看详情

您要求的商品无法购买

】您要求的商品无法购买【英文标题】:theitemyourequestedisnotavailableforpurchase【发布时间】:2012-10-1811:58:41【问题描述】:我正在尝试将AndroidMarket应用内购买集成到我的应用中,但不幸的是,每次我尝试购买真正的应用内产品时都... 查看详情