0

My Next.js app deploys successfully in preview and builds fine locally using a .env.

However, the Vercel production deploy (triggered via GitLab CI) fails with multiple

FetchError: request to https://graphql.contentful.com/... failed, reason: connect ETIMEDOUT

messages during static page generation.

The build logs show production uses

CMS_CONTENTFUL_ENV_ID=master

which points to a much larger Contentful environment.
It seems like the connection to Contentful times out while pre-rendering thousands of pages, even though all environment variables are correctly loaded via vercel pull.

Has anyone encountered this kind of Contentful timeout in Vercel’s production builds?
What’s the best approach — increase the Next.js static generation timeout, optimize queries, or handle this differently in CI/CD?

Or will simply redeploying work?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.