generateStaticParams to generate +20k pages
Unanswered
West African Crocodile posted this in #help-forum
West African CrocodileOP
I am trying to create 20,000 pages, and each page involves making 4-5 requests. This results in approximately 100,000 requests in a single minute during the building process. Is there a way to make Next.js perform the page build operation in batches with a delay between them?
As I progress with this operation, various issues start occurring after reaching page 3000, leading to a range of errors like
TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11730:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async globalThis.fetch (/Users/yandex/Documents/value-industrial-frontend/.next/server/chunks/638.js:1:36426)
at async Module.p (/Users/necdetefe/Documents/value-industrial-frontend/.next/server/app/[locale]/[location]/equipment-store/[main-category]/[sub-category]/page.js:1:8098) {
cause: Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
at TLSWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
errno: -54,
code: 'ECONNRESET',
syscall: 'read'
}
}
to dns issues and so on.
As I progress with this operation, various issues start occurring after reaching page 3000, leading to a range of errors like
TypeError: fetch failed
at Object.fetch (node:internal/deps/undici/undici:11730:11)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async globalThis.fetch (/Users/yandex/Documents/value-industrial-frontend/.next/server/chunks/638.js:1:36426)
at async Module.p (/Users/necdetefe/Documents/value-industrial-frontend/.next/server/app/[locale]/[location]/equipment-store/[main-category]/[sub-category]/page.js:1:8098) {
cause: Error: read ECONNRESET
at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
at TLSWrap.callbackTrampoline (node:internal/async_hooks:128:17) {
errno: -54,
code: 'ECONNRESET',
syscall: 'read'
}
}
to dns issues and so on.