Skip to content

Conversation

@doender
Copy link

@doender doender commented Jun 22, 2022

Description

Because the files from the temporary directory are copied after the process has been started (in the deploy hook), the process starts based on the wrong files. My hypothesis is that the very first time this doesn't cause issues as the process will crash (because there's no build folder), and an automatic restart will fix the situation. However, with an existing build the process will not crash and there will be inconsistencies between the process and the build folder. The proposed fix is to kill the process in the deploy hook after the files have been copied, so an automatic restart will cause the process the start with the new build folder.

Related Issue

#62

How Has This Been Tested?

I tested it in a clean environment with consecutive builds

@doender doender changed the title Fix issue #62 Kill process after copying mounts so it will restart with the correct build folder Jun 22, 2022
@doender doender changed the title Kill process after copying mounts so it will restart with the correct build folder Kill and auto-restart process after copying mounts Jun 22, 2022
@apfelbox
Copy link

This is basically required, so this should get merged.

@mbopp
Copy link

mbopp commented Aug 21, 2023

Would a symptom, possibly fixed by this solution be that the _buildManifest.js and _ssgManifest.js are returning a 404? I am occasionally encountering this problem after deployment, and I believe that restarting the server might be one way to solve it.

vercel/next.js#18389

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants