Just to fill in a bit more details I start emperor under a screen process. Basically
screen -m uwsgi --emperor ~/vassals I added the line to whanganuicafesandbars.co.nz.ini as follows: logto = /home/webquest/logos/whanganuicafesandbars.co.nz.uwsgi.log I used logto but unfortunately but it doesn't show the full error nor the full python traceback. This is all I see spawned uWSGI master process (pid: 13096) spawned uWSGI worker 1 (pid: 13100, cores: 1) [pid: 13100|app: 0|req: 1/1] 118.92.186.5 () {52 vars in 980 bytes} [Mon Apr 20 21:58:52 2020] GET / => generated 363 bytes in 333 msecs (HTTP/1.1 500) 4 headers in 142 bytes (2 switches on core 0) announcing my loyalty to the Emperor... [pid: 13100|app: 0|req: 2/2] 118.92.186.5 () {52 vars in 937 bytes} [Mon Apr 20 21:58:53 2020] GET /favicon.ico => generated 363 bytes in 19 msecs (HTTP/1.1 500) 3 headers in 128 bytes (1 switches on core 0) Any ideas on how to see the full python traceback for Django?? On Mon, 2020-04-20 at 11:10 -0500, Jorge Gallegos wrote: > I believe you meant to do: > > uwsgicmd="${uwsgicmd} --daemonize --logto=$HOME/logs/$(basename > $DIR).log"; > > --daemonize doesn't receive a param, maybe a typo? > > However I'd suggest moving the logging flags to your .ini file and > only > leave --daemonize in the command call. > > > Cheers > > On Mon, Apr 20, 2020 at 03:18:00PM +1200, Glenn Reed wrote: > > Hoping someone might be able to advise me > > > > For some reason when I run uwsgi with this script I get no errors: > > > > #!/bin/bash > > # Note --http should be used if pointing a browser directly > > # to this socket. Otherwise if upstream from nginx use --socket > > > > # Taken from > > https://stackoverflow.com/questions/59895/get-the-source-directory-of-a-bash-script-from-within-the-script-itself#DIR="$( > > cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" > > while getopts ":dm:v:" o; do > > case "${o}" in > > d) > > daemonize=true > > ;; > > m) > > module=$OPTARG > > ;; > > v) > > venv=$OPTARG > > ;; > > *) > > ;; > > esac > > done > > > > DIR=$(pwd) > > echo "damonize=$daemonize" > > echo $DIR > > [ -d $HOME/logs ] || mkdir $HOME/logs > > [ -d $HOME/pids ] || mkdir $HOME/pids > > [ -d $HOME/sockets ] || mkdir $HOME/sockets > > > > if [ -z "$module" ]; then > > module=$(basename $DIR); > > fi > > > > if [ -z "$venv" ]; then > > venv="$HOME/venvs/$(basename $DIR)"; > > fi > > source $venv/bin/activate > > read -d '' uwsgicmd << EOF > > > > uwsgi --chdir=$DIR \ > > --module=$module.wsgi:application \ > > --master --pidfile=$HOME/pids/$(basename $DIR).pid \ > > --socket=/tmp/$(basename $DIR).sock \ > > --processes=1 \ > > --static-map /static=$DIR/static \ > > --chmod-socket=666 \ > > --harakiri=20 \ > > --max-requests=5000 \ > > --vacuum > > EOF > > if [ -n "${daemonize}" ]; then > > uwsgicmd="${uwsgicmd} --daemonize=$HOME/logs/$(basename > > $DIR).log"; # background the process > > fi > > > > echo $uwsgicmd > > eval $uwsgicmd > > > > ============================================ > > > > However when I try to run in emporer mode I get http 500 errors. > > > > The main issue is not that I get errors but that I lose my error > > log when running in emporer mode. > > > > this is my into file for the vassal > > > > [uwsgi] > > chdir = /home/webquest/html/whanganuijobs.co.nz > > uid = webquest > > gid = webquest > > socket = /tmp/%n.sock > > chmod-socket = 666 > > plugins = python3 > > processes = 1 > > master = 1 > > module = funeral_notices.wsgi:application > > env = DJANGO_SETTINGS_MODULE=funeral_notices.settings.production > > # Use home directive to specify virutalenv path > > log-master = true > > virtualenv = /home/webquest/venvs/whanganuijobs/ > > > > ========================= > > > > Even though I have log-master set to true I see no error log from > > the emporer process. > > > > Any ideas? > > _______________________________________________ > > uWSGI mailing list > > uWSGI@lists.unbit.it > > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi > > > _______________________________________________ > uWSGI mailing list > uWSGI@lists.unbit.it > http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi _______________________________________________ uWSGI mailing list uWSGI@lists.unbit.it http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi