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 phoenix http #926

Merged
merged 4 commits into from
Apr 11, 2024
Merged

Fix phoenix http #926

merged 4 commits into from
Apr 11, 2024

Conversation

Jake-Shadle
Copy link
Collaborator

This fixes the issue where the phoenix HTTP server would stop responding after some amount of time. The issue was that since a single thread was being used for the service, it would deadlock itself accessing the Inner::nodes map, as the background_update_task could be context switched during an await while a write lock was held, causing the "main" loop to deadlock adding/retrieving nodes (or vice versa). I'm fairly confident this is the fix as now locks will eventually be released as tokio will be driving all tasks, not only a single one.

Resolves: #918

This also adds thread names to all of the threads and tokio workers spawned by quilkin for easier debug inspection. This also made me realize that because we use tokio::main we spawn a ton of extra workers in the proxy case, but I'll leave fixing that for a different PR.

@Jake-Shadle Jake-Shadle merged commit fa6e001 into main Apr 11, 2024
11 checks passed
@quilkin-bot
Copy link
Collaborator

Build Succeeded 🥳

Build Id: 8bb752ca-8d61-41bb-b9f9-64d1299af94d

The following development images have been built, and will exist for the next 30 days:

To build this version:

git fetch git@github.com:googleforgames/quilkin.git pull/926/head:pr_926 && git checkout pr_926
cargo build

@Jake-Shadle Jake-Shadle deleted the fix-phoenix-http branch April 11, 2024 12:02
@markmandel markmandel added kind/bug Something isn't working area/operations Installation, updating, metrics etc labels Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/operations Installation, updating, metrics etc kind/bug Something isn't working size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Phoenix HTTP service stops responding after some amount of time
4 participants