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

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

## Root Cause

The generateStaticParams function or the page rendering for a dynamic route took longer than the default 60-second timeout during static generation, often due to slow data fetching or excessive number of paths.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Next.js 14.2.5 | active | — | — |
| Next.js 13.5.0 | active | — | — |

## Workarounds

1. **Optimize generateStaticParams by caching API calls: const paths = await fetch('/api/paths', { next: { revalidate: 3600 } })** (85% success)
   ```
   Optimize generateStaticParams by caching API calls: const paths = await fetch('/api/paths', { next: { revalidate: 3600 } })
   ```
2. **Use incremental static regeneration (ISR) with revalidate instead of full static generation: export const revalidate = 3600** (90% success)
   ```
   Use incremental static regeneration (ISR) with revalidate instead of full static generation: export const revalidate = 3600
   ```
3. **Switch to dynamic rendering for this page by removing generateStaticParams or adding export const dynamic = 'force-dynamic'** (95% success)
   ```
   Switch to dynamic rendering for this page by removing generateStaticParams or adding export const dynamic = 'force-dynamic'
   ```

## Dead Ends

- **** — This only masks the problem; if the underlying data fetch is slow, it may still timeout at higher limits. (50% fail)
- **** — This breaks the dynamic routing functionality and may not be feasible for content-driven sites. (70% fail)
