SPB Git

spb/rareindex

Public

web: /data prerender budget (staticPageGenerationTimeout 240 s, hourly ISR) — build timed out at 60 s on 2M-row aggregates

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Simon-Pierre Boucher committed (Sep 8, 2026) parent 6c48aa5 Browse files

2 changed files +5 −1

modified apps/web/next.config.ts +2 −0
@@ -29,6 +29,8 @@ const nextConfig: NextConfig = {
29 remotePatterns: [{ protocol: 'https', hostname: '**' }], 29 remotePatterns: [{ protocol: 'https', hostname: '**' }],
30 formats: ['image/avif', 'image/webp'], 30 formats: ['image/avif', 'image/webp'],
31 }, 31 },
32+ // Static pages query a large database; give the prerender workers room (default 60 s).
33+ staticPageGenerationTimeout: 240,
32 experimental: { 34 experimental: {
33 optimizePackageImports: ['lucide-react'], 35 optimizePackageImports: ['lucide-react'],
34 // The image cache core is shared with the worker (workers/image-processing/core.ts) via a relative re-export. 36 // The image cache core is shared with the worker (workers/image-processing/core.ts) via a relative re-export.
modified apps/web/src/app/data/page.tsx +3 −1
@@ -1,4 +1,5 @@
1 import type { Metadata } from 'next'; 1 import type { Metadata } from 'next';
2+
2 import Link from 'next/link'; 3 import Link from 'next/link';
3 import { readFile } from 'node:fs/promises'; 4 import { readFile } from 'node:fs/promises';
4 import path from 'node:path'; 5 import path from 'node:path';
@@ -11,7 +12,8 @@ import { fmtNum, fmtRelative, cn } from '@/lib/format';
11 import { catName, humanize } from '@/lib/taxonomy'; 12 import { catName, humanize } from '@/lib/taxonomy';
12 13
13 export const metadata: Metadata = { title: 'Data & methodology', description: 'Coverage by category, source and connector; RareIndex methodology; exports and API access.' }; 14 export const metadata: Metadata = { title: 'Data & methodology', description: 'Coverage by category, source and connector; RareIndex methodology; exports and API access.' };
14−export const revalidate = 300; 15+// Coverage aggregates over millions of rows take ~70 s: prerender at build (staticPageGenerationTimeout raised), then hourly ISR.
16+export const revalidate = 3600;
15 17
16 async function loadMethodology(): Promise<string> { 18 async function loadMethodology(): Promise<string> {
17 const candidates = [path.resolve(process.cwd(), '../../docs/METHODOLOGY.md'), path.resolve(process.cwd(), 'docs/METHODOLOGY.md'), path.resolve(process.cwd(), '../docs/METHODOLOGY.md')]; 19 const candidates = [path.resolve(process.cwd(), '../../docs/METHODOLOGY.md'), path.resolve(process.cwd(), 'docs/METHODOLOGY.md'), path.resolve(process.cwd(), '../docs/METHODOLOGY.md')];
18 20
Menu

Theme