vercel/next.js · error

Warning: A page's revalidate option was set to more than a y

Error message

Warning: A page's revalidate option was set to more than a year for ${req.url}. This may have been done in error.
To only run getStaticProps at build-time and not revalidate at runtime, you can set `revalidate` to `false`!

What it means

Error "Warning: A page's revalidate option was set to more than a year for ${req.url}. This may have been done in error. To only run getStaticProps at build-time and not revalidate at runtime, you can set `revalidate` to `false`!" thrown in vercel/next.js.

Source

Thrown at packages/next/src/server/render.tsx:1012

      }
      if (typeof data.revalidate === 'number') {
        if (!Number.isInteger(data.revalidate)) {
          throw new Error(
            `A page's revalidate option must be seconds expressed as a natural number for ${req.url}. Mixed numbers, such as '${data.revalidate}', cannot be used.` +
              `\nTry changing the value to '${Math.ceil(
                data.revalidate
              )}' or using \`Math.ceil()\` if you're computing the value.`
          )
        } else if (data.revalidate <= 0) {
          throw new Error(
            `A page's revalidate option can not be less than or equal to zero for ${req.url}. A revalidate option of zero means to revalidate after _every_ request, and implies stale data cannot be tolerated.` +
              `\n\nTo never revalidate, you can set revalidate to \`false\` (only ran once at build-time).` +
              `\nTo revalidate as soon as possible, you can set the value to \`1\`.`
          )
        } else {
          if (data.revalidate > 31536000) {
            // if it's greater than a year for some reason error
            console.warn(
              `Warning: A page's revalidate option was set to more than a year for ${req.url}. This may have been done in error.` +
                `\nTo only run getStaticProps at build-time and not revalidate at runtime, you can set \`revalidate\` to \`false\`!`
            )
          }

          revalidate = data.revalidate
        }
      } else if (data.revalidate === true) {
        // When enabled, revalidate after 1 second. This value is optimal for
        // the most up-to-date page possible, but without a 1-to-1
        // request-refresh ratio.
        revalidate = 1
      } else if (
        data.revalidate === false ||
        typeof data.revalidate === 'undefined'
      ) {
        // By default, we never revalidate.
        revalidate = false

View on GitHub (pinned to 89d017eac4)

Solutions

  1. Lower `revalidate` to a reasonable number of seconds, or set `revalidate: false` to only render at build time.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/next/src/server/render.tsx:1014 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of vercel/next.js@89d017eac4 (2026-08-19). Data as JSON: /api/errors/6a0a8e5eb9abe291. Report an issue: GitHub.