python - APScheduler doesn't work with UWSGI -
i'm using django 1.8 , apscheduler run workers on intervals. works django's development server (e.g. ./manage.py runserver
) when setup project uwsgi , master=true
, uwsgi worker can't requests nginx , browser shows 504 gateway timed-out
error after 1-2min loading.
when change master=false
fine.
here uwsgi config:
[uwsgi] chdir = /var/www/projectname/backend/projectname module = projectname.wsgi:application wsgi-file = /var/www/projectname/backend/projectname/projectname/wsgi.py uid = root gid = root virtualenv = /var/www/venv/ master = false processes = 4 socket = :8080 logto = /var/www/projectname/log/uwsgi.log env = django_settings_module=projectname.settings enable-threads = true
please note i'm using django's appconfig run scheduler once. there problem uwsgi config or it's because of django?
consider uwsgi mules background tasks. workers handle requests, mules handle longer running stuff.
Comments
Post a Comment