0

I am having some weird issues when I run my application on a dev. server using UWSGI+nginx.. It works fine when my request completes within 5-6 mins.. For long deployments and requests taking longer than that, the UWSGI logs repeats the logs after around 5mins.. It's as if it spawns another process and I get two kinds of logs(one for current process and the repeated process). I am not sure why this is happening.. Did not find anything online. I am sure this is not related to my code because the same thing works perfectly fine in the lab env.. where I use the django runserver. Any insight would be appreciated..

The uwsgi.ini:-

# netadc_uwsgi.ini file

#uid    =       nginx
#gid    =       nginx

# Django-related settings
env     =       HTTPS=on

# the base directory (full path)
chdir   =       /home/netadc/apps/netadc

# Django's wsgi file
module  =       netadc.wsgi

# the virtualenv (full path)
home    =       /home/netadc/.venvs/netadc

# process-related settings
# master
master   =      true

# maximum number of worker processes
processes       = 10

buffer-size =   65536

# the socket (use the full path to be safe
socket  = /home/netadc/apps/netadc/netadc/uwsgi/tmp/netadc.sock

# ... with appropriate permissions - may be needed
#chmod-socket    = 666

# daemonize
daemonize       =       true

# logging
logger  =       file:/home/netadc/apps/netadc/netadc/uwsgi/tmp/netadc_uwsgi.log

# clear environment on exit
vacuum  =       true
Sindhujit
  • 51
  • 9
  • Can you provide any uWSGI configuration files? What sort of request takes 5-6 minutes? uWSGI probably thinks the worker is dead and kills it. – Jamie Counsell Mar 27 '17 at 20:34
  • Your requests should never take any longer than 2-3 seconds. Your workers are most likely timing out. If you have some heavy back end work to do, consider having some async workers that can handle the job, and notify the user when it's done (if necessary). – Jessie Mar 27 '17 at 20:46
  • I added the uwsgi.ini file in the original question.. These are huge requests where we are migrating from old legacy networking devices to SDN architecture, so after using the most optimized form of automation, some of them takes about 10-15 mins. – Sindhujit Mar 27 '17 at 20:47

0 Answers0