What was it that was restarting all those uwsgi processes
You were possibly terminating child processes before terminating the master process, so the master was spawning new children to replace them.
To shut down uwsgi gracefully you can issue a stop command to the master process:
~/apps/appname/env/bin/uwsgi --stop ~/apps/appname/tmp/uwsgi.pid
If that doesn't work, you can kill the master process:
kill -9 $( cat ~/apps/appname/tmp/uwsgi.pid )
stop script provided by our uwsgi app installer handles all of that for you.
how do I tell it to do the same but with my new cherrypy server?
I'm interpreting this as "how do I make my cherrypy process restart automatically after it is terminated?".
My advice there would be to use a process manager like
supervisord to do that for you. I'll be posting a HOWTO for that in the coming week, or that's the plan anyway 😃