Random 500 Errors after Deployment to Netlify with Next.js 14.1.4

Hello Netlify Community,

I am encountering a recurring issue with my Next.js site deployed on Netlify. My project is set up with Static Site Generation (SSG), and I’m running Next.js 14.1.4. After each deployment, certain pages randomly throw 500 errors. These errors change unpredictably with every new deployment—pages that previously worked may start showing 500 errors, and the errors do not seem to follow any identifiable pattern.

Site Details

Troubleshooting Attempts

  • I have checked for environment variable issues, configuration inconsistencies, and attempted multiple re-deployments, but the issue persists.
  • No logs are generated for these 500 errors, which is making it difficult to diagnose the cause.

Questions

  1. Is there a way to enable detailed error logging for Next.js builds on Netlify to help identify the root cause of these random 500 errors?
  2. Are there any specific Next.js settings or configurations that could help resolve this issue?
  3. Has there been any known compatibility issue between Next.js 14.1.4 and Netlify that might lead to random 500 errors with SSG?

I would greatly appreciate any guidance or suggestions on resolving this issue.

Best regards,
Andreas

I do not see any 500s on the link you’ve shared. Is this resolved?

No, but as described, the errors are random and therefore the url works now. Here is another 500 page: https://dev-zaunergroup.cs-dev.tech/en/test-cases/cases

This looks to be due to a network level bug that we’re seeing on some random sites. This is being investigated by the devs.

This should now be resolved. Please let us know if you continue to see issues!