When a deploy, a rollback or a lower instance count replaces a running
instance, it now stops cleanly. The instance is taken out of rotation, keeps
running for 5 seconds so requests already on their way still arrive, and is
then sent SIGTERM with the rest of a 30-second window to finish what it is
serving.
Before, the signal often never reached your server. An app started through a
shell, a start script or a Run command, and every PHP and Laravel app, sat
out the full 30 seconds and was then killed, while an app started with
npm start was stopped before it could finish its requests. The signal now
reaches your server in all of these cases.
Handle SIGTERM in your app to finish in-flight work before exiting. Each app
picks up the change the next time it is deployed or its settings are saved.
See How instances stop for the
details, including what to do in a Dockerfile.
The Build command setting also now takes effect for apps built with Automatic. It used to be ignored unless the app was a static site; it now replaces the detected build step on the app's next build. If you saved one earlier, check it still does what you want before you next deploy.