Skip to content

Conversation

@rebeccahhh
Copy link
Member

not timing out before undercuts usefulness of our log-traceback-middleware in django-ansible-base that logs a traceback from requests that get timed out -- because uwsgi or gunicorn has to send the timeout signal to the worker handling the request. Also leads to issues where requests that envoy has already timed out are filling up queues of the workers of the components.

Also, configure nginx to return a 503 if WSGI server doesn't respond.
Similar changes for the AWX operator: ansible/awx-operator#2056

not timing out before undercuts usefulness of our log-traceback-middleware in
django-ansible-base that logs a traceback from requests that get timed
out -- because uwsgi or gunicorn has to send the timeout signal to the
worker handling the request. Also leads to issues where requests that
envoy has already timed out are filling up queues of the workers of the
components.

Also, configure nginx to return a 503 if WSGI server doesn't respond.
Co-Authored-By: Elijah DeLee <[email protected]>
@kdelee
Copy link
Member

kdelee commented Jul 3, 2025

LGTM

@BATMAN-JD
Copy link

Pretty straight forward. Looks like there is a little legwork for me to test locally. Anyway you could provide some screenshots of the local deployment you have configmaps with these changes after applied?

@rebeccahhh
Copy link
Member Author

image

@rebeccahhh
Copy link
Member Author

image

@rebeccahhh
Copy link
Member Author

image

@rebeccahhh
Copy link
Member Author

image

@rebeccahhh
Copy link
Member Author

image

@rebeccahhh
Copy link
Member Author

image forgot to include event stream screenshot

… since they seem to get used there, rectify naming mishap with eda_gunicorn_... vs just gunicorn_...
@rebeccahhh rebeccahhh force-pushed the timeout_api_before_proxy branch from 29a1b4c to 08b2204 Compare July 16, 2025 19:42
@sonarqubecloud
Copy link

event_stream_nginx_port: 8000
event_stream_server_name: "{{ ansible_operator_meta.name }}-event-stream"
event_stream_django_port: 8002

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ttuffin I ended up moving this out of defaults over to vars, it seems like this is the more "correct" spot for these based on the other variables present in this file that get used in the gunicorn --bind statements. If the vars are here it works as I expect in terms of correctly setting the vars in the deployment/pod.

Copy link
Contributor

@ttuffin ttuffin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

@BATMAN-JD BATMAN-JD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aknochow aknochow merged commit 1fe377e into ansible:main Jul 21, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants