From f793bdab04b26c1ba6a03596fb0f395c96b09bc0 Mon Sep 17 00:00:00 2001 From: Elijah DeLee Date: Fri, 16 Aug 2024 11:16:14 -0400 Subject: [PATCH] catch harakiri graceful signal in middlware and log debug info Middleware is from django_ansible_base --- awx/settings/defaults.py | 1 + tools/ansible/roles/dockerfile/files/uwsgi.ini | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index 6f57730627d0..50e467adf2fb 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -1017,6 +1017,7 @@ MIDDLEWARE = [ 'django_guid.middleware.guid_middleware', + 'ansible_base.lib.middleware.logging.log_request.LogTracebackMiddleware', 'awx.main.middleware.SettingsCacheMiddleware', 'awx.main.middleware.TimingMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', diff --git a/tools/ansible/roles/dockerfile/files/uwsgi.ini b/tools/ansible/roles/dockerfile/files/uwsgi.ini index bfd1f87f701b..0f27eb9b4106 100644 --- a/tools/ansible/roles/dockerfile/files/uwsgi.ini +++ b/tools/ansible/roles/dockerfile/files/uwsgi.ini @@ -10,6 +10,11 @@ master-fifo = /var/lib/awx/awxfifo max-requests = 1000 buffer-size = 32768 +harakiri = 115 +harakiri-graceful-timeout = 110 +harakiri-graceful-signal = 6 +py-call-osafterfork = true + if-env = UWSGI_MOUNT_PATH mount = %(_)=awx.wsgi:application endif =