{"record":{"id":"cf0204756c857e35","repo":"withastro/astro","slug":"please-make-sure-that-your-plan-allows-for-this-du","errorCode":null,"errorMessage":"Please make sure that your plan allows for this duration. See https://vercel.com/docs/functions/serverless-functions/runtimes#maxduration for more information.","messagePattern":"Please make sure that your plan allows for this duration\\. See https://vercel\\.com/docs/functions/serverless-functions/runtimes#maxduration for more information\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/integrations/vercel/src/index.ts","lineNumber":350,"sourceCode":"\t\t\t\t\t\timagesConfig,\n\t\t\t\t\t\tcommand,\n\t\t\t\t\t\tdevImageService,\n\t\t\t\t\t\tconfig.image,\n\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t},\n\t\t\t'astro:routes:resolved': (params) => {\n\t\t\t\troutes = params.routes;\n\t\t\t},\n\t\t\t'astro:config:done': ({ setAdapter, config, logger, buildOutput }) => {\n\t\t\t\t_buildOutput = buildOutput;\n\n\t\t\t\tif (_buildOutput === 'server') {\n\t\t\t\t\tif (maxDuration && maxDuration > 900) {\n\t\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t\t`maxDuration is set to ${maxDuration} seconds, which is longer than the maximum allowed duration of 900 seconds.`,\n\t\t\t\t\t\t);\n\t\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t\t`Please make sure that your plan allows for this duration. See https://vercel.com/docs/functions/serverless-functions/runtimes#maxduration for more information.`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tconst vercelConfigPath = new URL('vercel.json', config.root);\n\t\t\t\t\tif (\n\t\t\t\t\t\tconfig.trailingSlash &&\n\t\t\t\t\t\tconfig.trailingSlash !== 'ignore' &&\n\t\t\t\t\t\texistsSync(vercelConfigPath)\n\t\t\t\t\t) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tconst vercelConfig = JSON.parse(readFileSync(vercelConfigPath, 'utf-8'));\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t(vercelConfig.trailingSlash === true && config.trailingSlash === 'never') ||\n\t\t\t\t\t\t\t\t(vercelConfig.trailingSlash === false && config.trailingSlash === 'always')\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\tlogger.error(\n\t\t\t\t\t\t\t\t\t`\n\tYour \"vercel.json\" \\`trailingSlash\\` configuration (set to \\`${vercelConfig.trailingSlash}\\`) will conflict with your Astro \\`trailingSlash\\` configuration (set to \\`${JSON.stringify(config.trailingSlash)}\\`).","sourceCodeStart":332,"sourceCodeEnd":368,"githubUrl":"https://github.com/withastro/astro/blob/3578d45d34226d63cff3d261c971c221de6794d2/packages/integrations/vercel/src/index.ts#L332-L368","documentation":"Companion warning printed immediately after the 'maxDuration is set to N seconds...' message by the Vercel adapter's astro:config:done hook. It does not indicate a separate problem: it points out that values above 900 seconds are only honored on Vercel plans that allow them, and links to the runtimes#maxduration documentation. The adapter still writes your maxDuration into the generated function config.","triggerScenarios":" Always co-emitted when output: 'server' and maxDuration > 900 on the vercel() adapter options; appears as the second logger.warn inside the same if block.","commonSituations":" Same situations as the first maxDuration warning: migrated Lambda timeouts, long SSR/AI requests, or Enterprise users who can legitimately exceed 900s but should confirm plan support.","solutions":["Cap maxDuration at 900 unless your Vercel plan explicitly supports more.","Verify your plan's limit at the linked doc (vercel.com/docs/functions/serverless-functions/runtimes#maxduration) before keeping a larger value.","Refactor work longer than the limit into queued/background processing (cron, fluid compute, task queue)."],"exampleFix":"// before\nvercel({ maxDuration: 1200 }), // plan only allows 900\n\n// after\nvercel({ maxDuration: 900 }),","handlingStrategy":"validation","validationCode":"const PLAN_MAX_DURATION = 900; // confirm against https://vercel.com/docs/functions/serverless-functions/runtimes#maxduration\nif (maxDuration > PLAN_MAX_DURATION) {\n  console.warn(`Clamping maxDuration from ${maxDuration} to ${PLAN_MAX_DURATION}`);\n  maxDuration = PLAN_MAX_DURATION;\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Verify the plan's max duration before configuring values above 900 seconds.","Treat both maxDuration warnings as one issue: plan capability vs configured value.","Re-check limits when upgrading the Vercel plan or the adapter version."],"tags":["vercel","maxduration","plan-limits","serverless"],"backgroundTag":"function-duration-limit-exceeded","analyzedSha":"3578d45d34226d63cff3d261c971c221de6794d2","analyzedAt":"2026-08-18T18:48:03.901Z","contentChangedAt":"2026-08-18T18:48:03.901Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}