{"record":{"id":"efc966cffe6f7925","repo":"gatsbyjs/gatsby","slug":"we-recommend-you-to-set-your-pagelimit-in-gatsby-c","errorCode":null,"errorMessage":"We recommend you to set your pageLimit in gatsby-config.js to ${currentPageLimit} to avoid failed synchronizations.","messagePattern":"We recommend you to set your pageLimit in gatsby-config\\.js to (.+?) to avoid failed synchronizations\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby-source-contentful/src/fetch.js","lineNumber":317,"sourceCode":"          e.response?.data?.message.includes(`Response size too big`) &&\n          currentPageLimit > 1\n        ) {\n          lastCurrentPageLimit = currentPageLimit\n          // Reduce page limit by a arbitrary 1/3 of the current limit to ensure\n          // the new and bigger entries are synced without exceeding the reponse size limit\n          currentPageLimit = Math.floor((currentPageLimit / 3) * 2) || 1\n          reporter.warn(\n            [\n              `The sync with Contentful failed using pageLimit ${lastCurrentPageLimit} as the reponse size limit of the API is exceeded.`,\n              `Retrying sync with pageLimit of ${currentPageLimit}`,\n            ].join(`\\n\\n`)\n          )\n          continue\n        }\n        throw e\n      }\n      if (currentPageLimit !== pageLimit) {\n        reporter.warn(\n          `We recommend you to set your pageLimit in gatsby-config.js to ${currentPageLimit} to avoid failed synchronizations.`\n        )\n      }\n    }\n  } catch (e) {\n    reporter.panic({\n      id: CODES.SyncError,\n      context: {\n        sourceMessage: `Fetching contentful data failed: ${createContentfulErrorMessage(\n          e\n        )}`,\n      },\n    })\n  } finally {\n    // Fix output when there was no new data in Contentful\n    if (\n      !currentSyncData?.entries.length &&\n      !currentSyncData?.assets.length &&","sourceCodeStart":299,"sourceCodeEnd":335,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby-source-contentful/src/fetch.js#L299-L335","documentation":"This warning fires in fetchContent's error handler when a Contentful initial sync fails with 'Response size too big' and the current pageLimit is above 1. The plugin automatically shrinks the sync page size to two-thirds (floor((limit/3)*2), min 1) and retries, so the warning is advisory: it tells the user to hard-code the reduced limit in gatsby-config.js so future syncs succeed on the first attempt.","triggerScenarios":"Thrown at packages/gatsby-source-contentful/src/fetch.js:317 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the pageLimit option in gatsby-config.js to the value suggested in the warning (the reduced limit) so syncs no longer exceed the API response size limit.","Keep pageLimit at 1 if a single entry is already too large, or reduce the size of very large entries in Contentful.","Re-run the build; the plugin retries the sync automatically with the smaller page limit."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e85d62f1779e353eaac1753211629a26d123e26c","analyzedAt":"2026-08-26T17:50:09.662Z","contentChangedAt":"2026-08-26T17:50:09.662Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}