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

fix(api): AWSGraphQLSubscriptionTaskRunner failing to cancel AppSyncRealTimeSubscription #3615

Merged
merged 1 commit into from
Apr 16, 2024

Conversation

almasios
Copy link
Contributor

@almasios almasios commented Apr 16, 2024

Description

Amplify fails to cancel/deallocate AppSyncRealTimeSubscription because AWSGraphQLSubscriptionTaskRunner gets released before it has a chance to tell AppSyncRealTimeClient to unsubscribe the subscription.
If you keep cancelling and creating new subscriptions (for example when you minimize and open the app) at some point the number of active subscriptions reaches 100 and the app starts to crash.

edit:

  • this is reproducible in 2.29.1

General Checklist

  • Added new tests to cover change, if needed
  • Build succeeds with all target using Swift Package Manager
  • All unit tests pass
  • All integration tests pass
  • Security oriented best practices and standards are followed (e.g. using input sanitization, principle of least privilege, etc)
  • Documentation update for the change if required
  • PR title conforms to conventional commit style
  • New or updated tests include Given When Then inline code documentation and are named accordingly testThing_condition_expectation()
  • If breaking change, documentation/changelog update with migration instructions

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@almasios almasios requested a review from a team as a code owner April 16, 2024 14:57
@5d
Copy link
Member

5d commented Apr 16, 2024

Thanks for contributing, @almasios. Can you please specify the version with which you're encountering this issue in the description?

@almasios
Copy link
Contributor Author

Thanks for contributing, @almasios. Can you please specify the version with which you're encountering this issue in the description?

@5d this is using latest 2.29.1

@5d
Copy link
Member

5d commented Apr 16, 2024

Thank you, we'll look into this and get back to you after it.

Copy link
Member

@5d 5d left a comment

Choose a reason for hiding this comment

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

LGTM

@lawmicha lawmicha changed the title Fix AWSGraphQLSubscriptionTaskRunner failing to cancel AppSyncRealTimeSubscription fix(api): AWSGraphQLSubscriptionTaskRunner failing to cancel AppSyncRealTimeSubscription Apr 16, 2024
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:15 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:15 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:15 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:15 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:15 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:16 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:53 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:53 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:53 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d temporarily deployed to IntegrationTest April 16, 2024 21:57 — with GitHub Actions Inactive
@5d 5d merged commit f7488e3 into aws-amplify:main Apr 16, 2024
135 checks passed
@almasios almasios deleted the almas/fix_subscription_issue branch April 24, 2024 04:00
@almasios almasios restored the almas/fix_subscription_issue branch April 24, 2024 04:00
@almasios almasios deleted the almas/fix_subscription_issue branch July 12, 2024 14: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.

None yet

2 participants