Comments (5)
There is a known issue with tokio that can cause this under certain conditions. Please see #2239. Does this sound like your problem?
from rocket.
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:
#[get("/")]
fn index() -> &'static str {
"Hello, world!"
}
Here's a video demo:
video-demo
from rocket.
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π
from rocket.
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.
from rocket.
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 :)
from rocket.
Related Issues (20)
- Redirection to a route which takes a vector parameter results in an error HOT 1
- Allow users to create of Data<'r> objects HOT 5
- Validation not invoked on Json HOT 6
- Implement `FromForm` for `Range` HOT 1
- Missing license files in rocket_codegen-0.5.0.crate HOT 2
- Add SQLite extensions HOT 2
- Middleware that handles requests for static resources HOT 2
- Unable to build: no `Serialize` in `de` HOT 3
- Add default content_type for TempFile uploads HOT 2
- Could not find `json` in `serde` HOT 1
- Can't change IP that Rocket starts from. HOT 1
- Clippy lint: temporary with significant `Drop` can be early dropped HOT 1
- Rocket sometimes resets connection instead of responding with 413 error response HOT 2
- MiniJinja can't be used for templates HOT 1
- Routing by hostname HOT 10
- New release of rocket_dyn_templates HOT 3
- Redirector issue in TLS example HOT 5
- Deployment Docs - Static Files HOT 1
- FromForm Option<Result> with custom type
- Possible error in the Json guard HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rocket.