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

Close open WebSocket sessions when application is shutting down #4775

Merged
merged 10 commits into from Mar 14, 2022
Merged

Close open WebSocket sessions when application is shutting down #4775

merged 10 commits into from Mar 14, 2022

Conversation

oising
Copy link
Contributor

@oising oising commented Feb 17, 2022

When a dotnet core process hosting hotchocolate is signaled to shutdown, any open websocket sessions (i.e. subscriptions) will cause the shutdown process to stall until the default timeout, which is 30 seconds. At this point, the process is forcefully terminated. While the default is 30 seconds, some people (namely me, lol) have longer timeouts due to other things going on in their server. This makes my k8s rolling upgrades take a lot longer than I'd like :)

I noticed that WebSocket sessions are not explicitly closed on application shutdown. This PR adds that functionality.

@michaelstaib
Copy link
Member

Will have a look at this tomorrow.

Copy link
Member

@PascalSenn PascalSenn left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! :) 👏

This looks good to me, @michaelstaib you have the subscriptions currenlty on the brain stack, any objections for this?

@michaelstaib
Copy link
Member

Related #4813

@michaelstaib michaelstaib modified the milestones: HC-12.7.0, HC-13.0.0 Mar 9, 2022
@oising
Copy link
Contributor Author

oising commented Mar 11, 2022

Will have a look at this tomorrow.

12.7.1?

update: never mind, I see you've moved it to v13

Copy link
Member

@michaelstaib michaelstaib left a comment

Choose a reason for hiding this comment

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

I have integrated it into the new subscription layer.

@michaelstaib
Copy link
Member

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@sonarcloud
Copy link

sonarcloud bot commented Mar 14, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants