# Error: Static generation timed out after 60 seconds for path '/[slug]'. Consider increasing the static generation timeout.

- **ID:** `nextjs/static-generation-timeout-slug`
- **Domain:** nextjs
- **Category:** build_error
- **Verification:** ai_generated
- **Fix Rate:** 75%

## Root Cause

During static generation (e.g., with `output: export` or `generateStaticParams`), a page takes longer than the default 60-second timeout to render, often due to slow data fetching or heavy computation.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Next.js 13.3+ | active | — | — |
| Next.js 14.0 | active | — | — |
| Next.js 15.0 | active | — | — |

## Workarounds

1. **Increase the timeout in next.config.js: `module.exports = { staticGenerationTimeout: 120 }`** (80% success)
   ```
   Increase the timeout in next.config.js: `module.exports = { staticGenerationTimeout: 120 }`
   ```
2. **Optimize data fetching in the page: use caching, limit the number of items in `generateStaticParams`, or use incremental static regeneration.** (90% success)
   ```
   Optimize data fetching in the page: use caching, limit the number of items in `generateStaticParams`, or use incremental static regeneration.
   ```

## Dead Ends

- **** — This prevents static generation entirely, but if the project requires static export (`output: export`), dynamic rendering is not allowed. (70% fail)
- **** — It only masks the issue; if the underlying cause (slow data fetch) isn't fixed, builds become unreasonably long. (50% fail)
- **** — Breaking change: without it, dynamic routes won't be pre-rendered for static export, causing build failures. (85% fail)
