The 502 is issued by upstream nginx and not Apache. The logs:
[Wed Feb 11 03:39:29.734328 2015] [wsgi:info] [pid 20794:tid 140288199374592] mod_wsgi (pid=20794): Exiting process 'localhost:20241'. [Wed Feb 11 09:46:25.739769 2015] [mpm_event:notice] [pid 18462:tid 140264512485120] AH00489: Apache/2.4.12 (Unix) mod_wsgi/4.4.8 Python/2.7.9 configured -- resuming normal operations suggest that something killed your whole Apache instance and the cron job then restarted it on the quarter hour again. The log message before what you posted may gibe more information as to why and what signal Apache was sent. I don't know what WebFaction may do to proactively kill processes. Graham On 11/02/2015, at 8:59 PM, Paul Royik <[email protected]> wrote: > Hi again. > > Just got 502 error. > > logs: > > [Wed Feb 11 03:39:29.207365 2015] [wsgi:info] [pid 20794:tid 140288199374592] > mod_wsgi (pid=20794): Shutdown requested 'localhost:20241'. > [Wed Feb 11 03:39:29.218543 2015] [wsgi:info] [pid 20794:tid 140288199374592] > mod_wsgi (pid=20794): Stopping process 'localhost:20241'. > [Wed Feb 11 09:39:29.219070 2015] [wsgi:info] [pid 20787:tid 140288199374592] > mod_wsgi (pid=20794): Process 'localhost:20241' to be deregistered, as server > is restarting or being shutdown. > [Wed Feb 11 09:39:29.237292 2015] [wsgi:info] [pid 20787:tid 140288199374592] > mod_wsgi (pid=20794): Process 'localhost:20241' has been deregistered and > will no longer be monitored. > [Wed Feb 11 03:39:29.238325 2015] [wsgi:info] [pid 20794:tid 140288199374592] > mod_wsgi (pid=20794): Destroying interpreters. > [Wed Feb 11 03:39:29.238348 2015] [wsgi:info] [pid 20794:tid 140288199374592] > mod_wsgi (pid=20794): Cleanup interpreter ''. > [Wed Feb 11 03:39:29.238532 2015] [wsgi:info] [pid 20794:tid 140288199374592] > mod_wsgi (pid=20794): Terminating Python. > [Wed Feb 11 09:39:29.285717 2015] [core:info] [pid 20787:tid 140288199374592] > AH00096: removed PID file > /home/simamura/webapps/django_math/express/httpd.pid (pid=20787) > [Wed Feb 11 09:39:29.285738 2015] [mpm_event:notice] [pid 20787:tid > 140288199374592] AH00491: caught SIGTERM, shutting down > [Wed Feb 11 03:39:29.734300 2015] [wsgi:info] [pid 20794:tid 140288199374592] > mod_wsgi (pid=20794): Python has shutdown. > [Wed Feb 11 03:39:29.734328 2015] [wsgi:info] [pid 20794:tid 140288199374592] > mod_wsgi (pid=20794): Exiting process 'localhost:20241'. > [Wed Feb 11 09:46:25.739769 2015] [mpm_event:notice] [pid 18462:tid > 140264512485120] AH00489: Apache/2.4.12 (Unix) mod_wsgi/4.4.8 Python/2.7.9 > configured -- resuming normal operations > [Wed Feb 11 09:46:25.739732 2015] [wsgi:info] [pid 18464:tid 140264512485120] > mod_wsgi (pid=18464): Starting process 'localhost:20241' with threads=10. > [Wed Feb 11 09:46:25.739853 2015] [mpm_event:info] [pid 18462:tid > 140264512485120] AH00490: Server built: Feb 6 2015 11:47:32 > [Wed Feb 11 09:46:25.739875 2015] [core:notice] [pid 18462:tid > 140264512485120] AH00094: Command line: 'httpd (mod_wsgi-express) -f > /home/simamura/webapps/django_math/express/httpd.conf -D WSGI_ACCESS_LOG -D > WSGI_MPM_ENABLE_EVENT_MODULE -D WSGI_MPM_EXISTS_EVENT_MODULE -D > WSGI_MPM_EXISTS_WORKER_MODULE -D WSGI_MPM_EXISTS_PREFORK_MODULE' > [Wed Feb 11 09:46:25.739940 2015] [wsgi:info] [pid 18464:tid 140264512485120] > mod_wsgi (pid=18464): Python home /usr/local. > [Wed Feb 11 09:46:25.739956 2015] [wsgi:info] [pid 18464:tid 140264512485120] > mod_wsgi (pid=18464): Initializing Python. > [Wed Feb 11 09:46:25.757249 2015] [wsgi:info] [pid 18464:tid 140264512485120] > mod_wsgi (pid=18464): Attach interpreter ''. > [Wed Feb 11 09:46:25.758179 2015] [wsgi:info] [pid 18464:tid 140264512485120] > mod_wsgi (pid=18464): Imported 'mod_wsgi'. > [Wed Feb 11 09:46:25.758222 2015] [wsgi:info] [pid 18464:tid 140264512485120] > mod_wsgi (pid=18464, process='localhost:20241', application=''): Loading WSGI > script '/home/simamura/webapps/django_math/express/handler.wsgi'. > > > > > On on the frontend > 2015/02/11 09:39:31 [error] 32523#0: *34366513 connect() failed (111: > Connection refused) while connecting to upstream > 2015/02/11 09:39:41 [error] 32523#0: *34366812 connect() failed (111: > Connection refused) while connecting to upstream > > > Time is same. > > What should I do. Maybe change webfaction to something else? Can you advise? > Thank you. > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/modwsgi. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
