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
RuntimeError in uvicorn for some requests #111
Comments
Looks like it's a case when sending a response and the connection has closed prematurely. Might be resolved by Is it easy to reproduce? |
I am not sure how to reproduce. In one project it is happening for every 5 requests or so and it is failing randomly. In other projects its not happening at all. |
Okay. I’m guessing you’re not seeing error on the client side? Looks like we should issue a warning, and then return in this case. The application is sending data but the connection has been closed by the client, which isn’t really an error case, but is worth logging with a warning. Will see if can figure what Daphne does in this cases. |
I think daphne just silently ignores this case. Do you see the same behaviour running with ‘—http h11’? |
No For h11 also, it is throwing error
|
Released as 0.2.6 |
FYI I am getting this error with uvicorn 0.11.5 and h11 0.9.0, on a Django channels project. I'm running uvicorn with just the basic host/port options. The error happens only sometimes and has not had any impact on my app's functionality.
Happy to provide extra info. |
the same problem
|
could you do 2 things please to try nail that down,
thanks |
I cant update h11 to 0.10.0 because latest version httpcore (0.11.1):
|
FYI i updated to h11==0.11.0 and still getting the error. (Later I will work on providing the full bug report as requested, thank you.) |
I am working on creating a minimal reproducible example, but I am proceeding blindly since I don't really understand the error message, so I am just randomly adding / removing stuff from my code and trying different ways of loading the page. Could someone explain the error message a bit? That would help me craft a better MWE. I can get it to reproduce (but only sporadically) by quickly reloading a simple Django view that just loads this HTML:
I'm getting these errors:
|
(note, this error is not the same as the original one in this bug report, so let me know if i need to open a new issue) |
reading the message it seems like the keep-alive timer is at stake, we recently fixed 2 races conditions in #848 and #832 and the last one seems directly related, can you reproduce with the latest master ? |
Fixed by #832 it seems !😎 |
Still getting similar exceptions (can't provide some context, just catch it occasionally in my logs)
|
Those versions are too old. |
@Kludex Do you mean that upgrade to the latest version of uvicorn can resolve it to me? |
I hope so... I cannot say. But the first thing to do is upgrade those. |
Getting the same sporadic exceptions described by @arxell and @oTree-org (
Any leads? Thanks! |
Getting the same errors:
|
We are also getting a bunch of these errors. Our dependencies are:
|
This issue was resolved years ago, and there's too much information here. If interested, please open a discussion with a minimal reproducible example. |
For the commenters above - if the following applies to you:
..then you may be susceptible to encode/starlette#919, which can cause these errors in uvicorn:
This issue was resolved in Apologies for responding to an old issue, this page is the top search result for the above errors. |
@r1b I am still getting this error when trying to test Update: |
I'm using name fastapi==0.94.1 and had continuous
removing the middleware (which I'd like to keep though) solved the issue |
Same problem here, and I have a similar middleware as to @ClementWalte. (also with |
Hi I have a similar problem which appears when |
@Kludex Happy to investigate this issue if it still needs attention! |
Hi, same here. Seeing this occasionally when applying a load test on localhost. Using 5 Postman Runners, executed in parallel on same host. uvicorn==0.22.0 |
Hey! @bianucci |
@mighty-phoenix @bianucci Can you please provide the complete stack trace as well the config for any other tools you might be using to performing load testing. |
Same issue here with:
|
I'm going to lock this issue, since it should be a different cause from the initial issue. Please open a new issue with an MRE (and reference this issue there). I'll lock this discussion since people keep posting "same issue" messages. |
uvicorn==0.2.5
is throwing errors for some requests.The text was updated successfully, but these errors were encountered: