I was actually very specific about what we should do: send an
interrupt signal. In your case, you could catch that signal and allow
your long-running processes to finish. Likewise, an app which is has
any kind of long-running responses would want to take that approach.
All apps will need a variation on this, since even if the individual responses are fast, they will need to be completed before the process can exit. I'm not sure how this affects restarting Nginx, how does it handle pending responses when asked to restart with a new config?