{"record":{"id":"abed90c4c23eb8f3","repo":"gatsbyjs/gatsby","slug":"this-query-took-more-than-15s-to-run-which-might","errorCode":null,"errorMessage":"This query took more than 15s to run — which might indicate you're querying too much or have some unoptimized code:\\nFile path: ${queryJob.componentPath}","messagePattern":"This query took more than 15s to run — which might indicate you're querying too much or have some unoptimized code:\\\\nFile path: (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/gatsby/src/query/query-runner.ts","lineNumber":50,"sourceCode":"  hash?: string\n  query: string\n  componentPath: string\n  context: PageContext\n  queryType: \"page\" | \"static\" | \"slice\"\n  pluginCreatorId?: string\n}\n\nfunction reportLongRunningQueryJob(queryJob: IQueryJob): void {\n  const messageParts = [\n    `This query took more than 15s to run — which might indicate you're querying too much or have some unoptimized code:`,\n    `File path: ${queryJob.componentPath}`,\n  ]\n\n  if (queryJob.queryType === `page`) {\n    messageParts.push(`URL path: ${queryJob.context.path}`)\n  }\n\n  report.warn(messageParts.join(`\\n`))\n}\n\nfunction panicQueryJobError(\n  queryJob: IQueryJob,\n  errors: ReadonlyArray<GraphQLError>\n): void {\n  let urlPath = undefined\n  let queryContext = {}\n  const plugin = queryJob.pluginCreatorId || `none`\n\n  if (queryJob.queryType === `page`) {\n    urlPath = queryJob.context.path\n    queryContext = queryJob.context.context\n  }\n\n  const structuredErrors = errors.map(e => {\n    const structuredError = errorParser({\n      message: e.message,","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/gatsbyjs/gatsby/blob/e85d62f1779e353eaac1753211629a26d123e26c/packages/gatsby/src/query/query-runner.ts#L32-L68","documentation":"reportLongRunningQueryJob warns when a page/static/slice query ran longer than 15 seconds. This is a performance signal, not a failure: the query still completes, but it usually indicates an expensive query (deep connections, unfiltered lists) or slow source plugin code, and it can stall the overall build.","triggerScenarios":"Thrown at packages/gatsby/src/query/query-runner.ts:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Narrow the GraphQL query with filters, limits, and fewer nested fields","Add indexes/cache on the source side or use a faster source plugin","Profile the query with `gatsby build --verbose` or QUERY_ROWS_LIMIT instrumentation; split heavy pages into slices"],"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"}