Replies: 2 comments 1 reply
-
I just did a quick test, and can confirm, the chunk names are not the same between builds. All I did is build once locally, delete the .next folder, then build again. The results are different chunk names:
Many of the build artifacts do have the same names - it seems to be these app chunks that don't get the same (deterministic) hashes. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
I have a site that we have been running with 2 horizontally scaled pods, which uses
generateBuildId
to return the git hash of the current commit for reliable scaling. I thought that meant the chunk hashes would be deterministically generated - that is, they'd be the same between pods (which are built at startup in the runtime environment, since static generation occurs at build time, and the necessary services are not available in the build environment).This worked for a long time, but we just had a site meltdown because the chunk hash names didn't match, and when balancing occured, it was causing errors in loading. The solution was to scale back down to one instance for the time being. I did confirm by inspecting the build artifacts that .next/BUILD_ID matched between the pods, but the chunk names which were erroring did not.
Is BUILD_ID not intended to be used this way?
Additional information
I'm currently on next@14.1.4 Operating System: Platform: darwin (dev machine - we run node:20-alpine in production) Arch: arm64 Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:10:42 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6000 Binaries: Node: 20.11.1 npm: 10.2.4 (this project uses npm) Yarn: 1.22.22 pnpm: 8.15.4 Relevant Packages: next: 14.1.4 eslint-config-next: 14.1.3 react: 18.2.0 react-dom: 18.2.0 typescript: 5.4.2 Next.js Config: output: N/A
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions