andywar65 this usually happens when the PID file in your app's tmp directory gets out of sync with your active processes.
For example, if you exceed your RAM allowance and your processes get terminated and your app is restarted by cron later, then the PID file will not be cleaned up and the stop script won't be able to stop the app since it doesn't know the correct PID of the running process.
If you're running into this issue then you can solve it by replacing your uwsgi app's stop script with this:
#!/bin/bash
# change appname to your app's name
APP=appname
APPDIR="$HOME/apps/$APP"
PIDFILE="$APPDIR/tmp/uwsgi.pid"
UWSGI="$APPDIR/env/bin/uwsgi"
PID=$( pgrep -o -f $UWSGI ) || { echo "$UWSGI not running"; exit 99; }
echo $PID > $PIDFILE
$UWSGI --stop $PIDFILE
sleep 3
pgrep -o -f $UWSGI && {
echo "uWSGI did not stop, killing it."
kill -9 $PID
pkill -9 -f $UWSGI
}
rm -f $PIDFILE
echo "Stopped."