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

[GT-152] timeout causes ssm to crash #228

Merged
merged 1 commit into from
Jun 20, 2023

Conversation

Sae126V
Copy link
Member

@Sae126V Sae126V commented Mar 28, 2023

When we make use of AmsHttpRequests provided by the AMS itself, pull_sub. is a POST request and it under the hood uses _retry_make_request() where it tries to make an attempt for retries.

In our case, retry =3:
If enabled (retry > 0), multiple subscription pulls will be tried in case of problems/glitches with the AMS service.

Because we are using the ArgoMessagingService class under the hood, it is making use of requests lib. So timeouts (one of the API error status, requests.exceptions.ReadTimeout) from AMS (HTTP 408) or load balancer (HTTP 408 and 504) should be handled by AmsBalancerException, AmsConnectionException, AmsTimeoutException.

Resolves #214 .

@Sae126V Sae126V requested a review from a team as a code owner March 28, 2023 14:59
@gregcorbett
Copy link
Member

Looks good

Can you rebase away 84151b4 and 5022943?

I would shorten the line codeclimate has identified as being too long.

I don't think the Travis CI being stuck in the "Expected" state is caused by this PR, other recent PRs have this behaviour as well.

@gregcorbett
Copy link
Member

Working through https://stackoverflow.com/a/70994400 may resolve the weirdness of this PR showing already merged commits, it worked for GOCDB/gocdb#447.

@Sae126V Sae126V force-pushed the GT-152-Timeout-causes-SSM-to-crash branch 3 times, most recently from 8f86972 to 93faef4 Compare May 9, 2023 08:40
@Sae126V
Copy link
Member Author

Sae126V commented May 9, 2023

'Applied Rebase' - Squashed the commits into one.

@tofu-rocketry tofu-rocketry added this to the 3.5.0 milestone Jun 12, 2023
@Sae126V Sae126V force-pushed the GT-152-Timeout-causes-SSM-to-crash branch 3 times, most recently from 0c4e83d to 93faef4 Compare June 13, 2023 08:50
@Sae126V Sae126V force-pushed the GT-152-Timeout-causes-SSM-to-crash branch 2 times, most recently from f6d3288 to b53510a Compare June 15, 2023 08:21
@Sae126V Sae126V changed the title Gt 152 timeout causes ssm to crash [GT-152] timeout causes ssm to crash Jun 15, 2023
@tofu-rocketry
Copy link
Member

So timeouts ... should be handled by AmsBalancerException, AmsConnectionException, AmsTimeoutException.

But this clearly isn't the case if you look at the log in #214. The exception type raised is requests.exceptions.ReadTimeout. This won't be a subclass of any of the AMS exception types, right? So trying to catch an AMS exception type won't help. We need to catch the ReadTimeout.

@Sae126V
Copy link
Member Author

Sae126V commented Jun 15, 2023

Note:

Findings' shows that it seems there is an issue with older version of AMS when ReadTimeout Exception occurs. But, Newer versions was able to catch these errors. So, We have decided to catch the issues with what New version of ARGO AMS library is offering.

For ref:
https://github.com/ARGOeu/argo-ams-library/releases/tag/v.0.6.0-1

@Sae126V Sae126V force-pushed the GT-152-Timeout-causes-SSM-to-crash branch 2 times, most recently from 5807085 to cb3b43e Compare June 15, 2023 14:37
Copy link
Member

@tofu-rocketry tofu-rocketry left a comment

Choose a reason for hiding this comment

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

If you address my comment, and rebase the code, then I should be able to slip this into version 3.3.0. 👍🏻

@Sae126V Sae126V force-pushed the GT-152-Timeout-causes-SSM-to-crash branch 2 times, most recently from 4fc943c to bb6445a Compare June 15, 2023 15:55
@tofu-rocketry
Copy link
Member

I've double checked that these exceptions are available in the AMS lib 0.5.4 and 0.5.1, as used on apel-preprod and apel prod, respectively.

@tofu-rocketry tofu-rocketry force-pushed the GT-152-Timeout-causes-SSM-to-crash branch from bb6445a to 83e91ca Compare June 15, 2023 16:40
@tofu-rocketry tofu-rocketry modified the milestones: 3.5.0, 3.3.0 Jun 15, 2023
@tofu-rocketry
Copy link
Member

@Sae126V Do check that you've pulled the latest from dev before you rebase. (I've sorted it out for this PR.)

@tofu-rocketry tofu-rocketry merged commit d590639 into apel:dev Jun 20, 2023
@Sae126V Sae126V deleted the GT-152-Timeout-causes-SSM-to-crash branch June 29, 2023 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

[GT-152] Read timeout causes SSM to crash
3 participants