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

All subscription slots are infinitely occupied #1421

Closed
xgreenx opened this issue Oct 13, 2023 · 0 comments · Fixed by #1432
Closed

All subscription slots are infinitely occupied #1421

xgreenx opened this issue Oct 13, 2023 · 0 comments · Fixed by #1432
Assignees
Labels
bug Something isn't working

Comments

@xgreenx
Copy link
Collaborator

xgreenx commented Oct 13, 2023

Problem overview

GraphQL API provides two subscriptions, submit_and_await and status_change. Both subscriptions use txpool.tx_update_subscribe(tx_id).await under the hood to subscribe for events of the transaction.

image image

The capacity of the subscription is 4064.
image

All slots are occupied by someone in Beta 4. It blocks users. Maybe someone tries to infinitely consume slots, or maybe we have a bug with slots releasing.

Solution

  • Add TTL(we can use TXPool's TTL) to shut down the subscription for submit_and_await.
  • Add TTL to shut down the subscription for status_change. But this subscription itself is meant to be infinite, so adding TTL may not be a good solution. Maybe instead, it is better to remove support for this subscription at all.
  • Add global TTL for all GraphQL tasks.
  • Investigate the correctness of subscription closing. We can add an integration test to verify correctness.
  • Instead of calling subscribe ().await it is better to call try_subscribe() and return an error to the user if we don't have any more slots.

Note

Making all proposed modifications in one PR is better because we need to create a release for beta 4.

@xgreenx xgreenx added the bug Something isn't working label Oct 13, 2023
Voxelot added a commit that referenced this issue Oct 16, 2023
fixes: #1421

---------

Co-authored-by: xgreenx <[email protected]>
@xgreenx xgreenx self-assigned this Oct 17, 2023
xgreenx added a commit that referenced this issue Oct 19, 2023
fixes: #1421

---------

Co-authored-by: xgreenx <[email protected]>
xgreenx added a commit that referenced this issue Oct 19, 2023
Applying hotfix #1422 to
`master` branch.

Closes #1421

---------

Co-authored-by: Brandon Kite <[email protected]>
crypto523 added a commit to crypto523/fuel-core that referenced this issue Oct 7, 2024
Applying hotfix FuelLabs/fuel-core#1422 to
`master` branch.

Closes FuelLabs/fuel-core#1421

---------

Co-authored-by: Brandon Kite <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant