Next.js Discord

Discord Forum

maxDuration on standalone mode

Unanswered
Large garden bumble bee posted this in #help-forum
Open in Discord
Large garden bumble beeOP
I've been looking at the documentation (and the source code) around setting the maxDuration for pages and API routes, but apparently the config is not actually used by Next.js at all, and it is only exposed to the "platform".

The problem with this is that if you are self-hosting it in Docker, as they suggest in their example, this configuration is pointless as the bundled Next.js server doesn't read the value nor does anything with it.

Essentially making this config a noop and no way to do this out of the box, unless you manually set timeouts with an abortcontroller or Promise.race

Has anyone found a way to replicate this behaviour?

0 Replies