Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust timeouts and improve logging #53

Merged

Conversation

BenjaminPelletier
Copy link
Member

In the effort to address #28, this PR improves logging and makes some timeouts more explicit and/or configurable, and shortens default timeouts to fail more quickly.

Copy link
Contributor

@barroco barroco left a comment

Choose a reason for hiding this comment

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

👍 Just a small remark inline.

@@ -145,6 +141,7 @@ def _poll_atproxy() -> None:
f"{query_url}/{request_to_handle.id}",
json=fulfillment,
auth=basic_auth,
timeout=(1, 2),
Copy link
Contributor

Choose a reason for hiding this comment

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

Those values seem low compared to others.

Copy link
Member Author

Choose a reason for hiding this comment

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

This is intentional and hopefully correct :) Both calls to atproxy handler endpoints should have very little overhead -- just accessing shared memory and returning the result. The first one (query) is given a longer timeout (8 seconds) because it intentionally blocks for 5 seconds optimistically hoping that a request might show up on the queue. The fulfillment query (this one) merely writes to shared memory and returns, so therefore should never reasonably take longer than this (I think).

I'm not 100% sure this is correct though because there's obviously something I don't understand because #28 continues to be a problem, especially on my local machine where I can reproduce it pretty much every time.

@BenjaminPelletier BenjaminPelletier merged commit e9a69df into interuss:main Feb 24, 2023
@BenjaminPelletier BenjaminPelletier deleted the uss_qualifier/logging branch February 24, 2023 16:04
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.

2 participants