Next.js Discord

Discord Forum

Chunks not found (404) after building a next.js app on self hosting Kubernetes cluster with multiple

Unanswered
Pacific sandlance posted this in #help-forum
Open in Discord
Pacific sandlanceOP
Hello guys,

We are working with kubernetes and multiple pods in a self-hosting application where we have created a PVC to be used as a shared volume between our replicas (pods). We kustupgraded from Next 12.3.3 to Next 13.5.6 using only Pages Router using https://nextjs.org/docs/pages/building-your-application/upgrading/version-13.
We also enabled:

experimental: { isrMemoryCacheSize: 0 }

for our ISR pages cache to be shared among the pods and everything worked as expected with the shared mount(All build folder content is included).
From the documentation we see that it is still supported in Next13. Unfortunately when we reach our website we see some chunks getting 404 (mostly webpack-... chunk) , but 1 out of X pods works fine. We have checked that the chunks requested are there so can't really explain why the pod can't "see" them.

We have also tried using incrementalCacheHandlerPath flag (even though we didn't use it for our Next.js 12.3.3 configuration)
Still no luck. Any suggestion on what could possibly go wrong?

Thanks

2 Replies

Pacific sandlanceOP
Someone?
Silky ant
I'd be happy to help you with your projecty