-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Response Code 0 during HTTP post #1392
Comments
What's the value of the response |
Sorry for the delay, our issue seems rather intermittent so it's proving difficult to reproduce, i will the code so that it logs the error message property and update here issue when i have the info. thanks. |
I will keep it open until Ranger closes it. When you get more info, feel free to reopen even if the issue gets closed. Also, check the docs to understand how RestSharp handles exceptions, maybe you will find out what went wrong https://restsharp.dev/usage/exceptions.html |
It looks like the error message is An error occurred while sending the request. Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. |
Seems like you need to check the server-side and the connection. |
I've had this issue as well the entire time I've used RestSharp. I'm on 106.10.1 |
We have a similar issue wit RestSharp, Seems we could solve our issues by setting header 'Connection: close' We could finally reproduce the issue with the following code: ` namespace TestRestSharp
} 'someurl' returns some small json. Originally the server was a jetty behind an nginx proxy, but the same behaviour occured fetching a static file from an apache webserver To reproduce we needed to use at least 2 threads. It consistently fails after ~ 3000 requests per thread. If you restart the test just after the error occured, the request returns '0' immediately. We think it is caused by poor handling of keep-alive connections in .net core. If Connection header is set to close, the test program works fine (just set 'close' to true) See also: |
@JSurf great analysis. One issue I with |
I actually think they messed up while trying overcome that limitation with a simple caching mechanism, see the second issue linked: |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
|
I am performing a HTTP post using IRestClient and i intermittently receive a HTTP Response Status Code of 0. Having researched this online i have identified other posts reporting this behaviour during HTTP timeout or connection being closed, however i just want to post to determine if this is a known issue, or if there is a fix available.
I am using RestSharp version: 106.6.7
May be related to #1379
The text was updated successfully, but these errors were encountered: