-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
ConnectionAbortedException ---> Reading is already in progress #52324
Comments
@Transis-Felipe From your description, it sounds like this behavior is new in 8.0. Which version were you on before you upgraded? |
Sorry, I didn't understand this suggestion. Can you elaborate? |
The exception is from here. #33409 had a similar stack and was closed in favor of dotnet/runtime#53914. It would be interesting to know whether their setup sounds similar to what you're doing. |
The stack trace doesn't give us much to go on. I'd say the next steps are probably to collect (and, ideally, share) more verbose logs and to review dotnet/runtime#53914 (which is quite old) in case the problems described there sound similar to your scenario. |
Hi @Transis-Felipe. We have added the "Needs: Author Feedback" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
Hi @amcasey , TryMapGet to not generate ReportApplicationError when there's an InvalidOperationException |
Before .net 8 I was using .net 7, but the error was the same. |
@Transis-Felipe From dotnet/runtime#53914, it sounds like there are corner cases where subtle buffering behavior can cause this error to be reported. Have you reviewed that issue to see whether any of the practices describe there sound like what your app is doing? Where are you seeing people talking about encountering this issue in .net core 3? I haven't been able to find any reports other than the ones I linked above. |
I don't have access to client apps that consumes this app. |
A lot of the comments I noticed in that issue were about buffering on the server side, so I wouldn't have thought you'd need access to the client apps. Unless you're saying you don't have a client that exercise your server to validate these things? |
Yep, they run for their own |
Does that mean you're unable to debug the server or collect additional server logs? |
I can't debug, but I can collect additional logs. |
I don't see any logs that directly track the |
Do the problematic requests include |
In the server side I can see this ? I don't have access to or how client side do the access. |
How can I grab this ? |
I usually update my appsettings.json, but there are a number of options, depending on your setup. |
Wow, changing appsettings to debug produces a lot of info... Any chance to generate logs only for errors ? |
Yep! We don't recommend enabling it in production unless you're trying to diagnose a particular problem. There are ways to filter to only particular log messages to reduce the volume but the problem here is that we don't know what to filter to - basically, we're just trying to collect as much info as possible about the period before a failure. A rolling log would be convenient but, unfortunately, I don't believe anything like that is built in. It seems possible that someone has built a nuget package for that, but I don't know of one off the top of my head. |
I will try to use debug for sometime to see if we catch the error. |
Sorry, I missed this before. The server can certainly dump request headers, but it makes the output much more verbose. We could get a pretty good idea from the response status codes though - are you seeing any 100s (i.e. on one of the "request finished" lines)? |
That's weird - I wouldn't expect the client to send another request on the same connection after the |
You'd have to enable connection logging or use something like wireshark to see what was actually in the bad request. Also, this doesn't appear to have lead to the Edit: It looks like this variant of the error message (which would normally include the invalid line) indicates that the message was truncated. |
No, it's another error that I catch. I will exclude to not confuse. |
Sorry to ask you for this, but I'm not finding a way to redirect output to a file The console it limited to 9999 lines, so it loses results quickly |
Unfortunately, I don't think there's built-in support for that - I usually just redirect stdout to a file. There are third party extensions that give you more control, but there isn't a particular one I can recommend off the top of my head. |
Hi, we're seeing a similar issue on .net 6.0.25. Ubuntu 22, x64, Kestrel is behind Apache with http2.
|
@j-hudecek Did these suggestions help at all? |
Do you mean setting higher Expect100ContinueTimeout? I'll try it. We haven't seen the error since, though, so it will take a while to know if it helped |
Describe the bug
We're frequently getting the exception below in .net 8.0.
Microsoft.AspNetCore.Connections.ConnectionAbortedException: The connection was aborted by the application.
---> System.InvalidOperationException: Reading is already in progress.
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.Http1MessageBody.OnConsumeAsync()
--- End of inner exception stack trace ---
Further technical details
ASP.NET Core 8.0
Kestrel on Windows Server 2019
https://github.com/dotnet/aspnetcore/blob/main/src/Servers/Kestrel/Core/src/Internal/Http/Http1MessageBody.cs
One suggestion should be to implement TryMapGet to be called instead of app.MapGet on the server side.
The text was updated successfully, but these errors were encountered: