-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Rocket App Hangs #2729
Comments
There is a known issue with tokio that can cause this under certain conditions. Please see #2239. Does this sound like your problem? |
I don't think this is the same issue, because my app hangs even on a simple "Hello, World!" return, and my route is as simple as:
Here's a video demo: |
Huh, never mind - I think this was actually not Rocket's fault. For context, I had my backend deployed on a Kubernetes cluster of Raspberry Pis and was accessing the backend through a NodePort service. I noticed that if I exec into the pod and curled it... It would never hang! So, to experiment, I tried swapping the NodePort for a LoadBalancer, and that did it 😅 This must be a problem w/ K3S's implementation of NodePorts. I'm closing the issue - thanks for the support👍 |
Looking at your source code, this does seem to also be an instance of that, you're just not hitting it yet. You're using diesel, the synchronous version, in an asynchronous context. This will block. You simply cannot mix sync and async code, especially when there's I/O. For diesel, you must use diesel_async. Note that this isn't Rocket specific - this is the case for any async Rust application. |
I don't think it should block when hitting my "Hello, World!" route though, no? Regardless, if the problem comes back, I'll make sure to change that. I appreciate your comment :) |
Rocket Version
0.5.0
Operating System
debian:bookworm-slim
Rust Toolchain Version
rustc 1.76.0 (07dca489a 2024-02-04)
What happened?
As mentioned, I've got my application deployed on a
debian:bookworm-slim
image. It was built on rustc 1.76.0 (07dca489a 2024-02-04).I can make a couple of requests to it (
/
), but, eventually, like the title says, it hangs - for even as long as 5 minutes. Also, running Apache's benchmarking on it times out.I attemped running
strace
on it, and I see this:Going from the interpretation of this post (that has the same issue as me), it's hanging on that futex - not really sure what to do about it.
Test Case
Log Output
Additional Context
No response
System Checks
rustc
toolchain.The text was updated successfully, but these errors were encountered: