Check the signal. You need to send signal 2 instead of 15 to your node process. Basically “INT” instead of “TERM”. If you send 15, the database will not be closed cleanly and your node will re-scan the DB for errors.
Systemd sends “TERM” by default followed by “KILL” in 90 seconds.
Docker and Podman send “TERM” as well.
In more details. Node code traps signals. Depending on which signal it receives, it acts accordingly. When it receives “INT”, it executes code that cleans everything up and closes the DB correctly. Upon closing the DB it marks it as “cleanly closed” (similar to the OS filesystem).
So send 2 - not 15. And most definitely NOT 9 lol