-
Notifications
You must be signed in to change notification settings - Fork 101
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
Chunked Encoding Issues #333
Comments
@onesandzeros415 Is this something you've observed as well? |
I've not been able to reproduce this. |
We see this from time to time too, so don't expect to be able to reproduce it immediately.... it's not a code logic issue, it appears to be some infrastructure event (or issue) that bubbles its way to the driver and causes this issue We are working with Rackspace to resolve the problem as we have contacts internal... I will post back here if there is any resolution. |
Here is some more information (in the form of an email to Rackspace) about the issue and our resolution... our CTO wrote it: ----- start email ----- I was hasty in blaming something internal to our environment. It seems the problem is in the library supplied by you to connect to the cloud files (RackspaceOpenStack.Net). We're not sure why (perhaps a router restart or something) and it has put the component into an errored state. While restarting the application resolved the problem it appears you have an issue you in your code. I suspect the settings on the Stream request are cached somewhere. In line 322 of RestServiceBase.cs, the value for settings.ChunkRequest was the problem and the settings are passed in to initiate the stream to the server. If this settings object was cached somewhere and for some reason the endpoint being streamed to was routed through a 1.0 proxy or something else on the network changed, you would find that the cached settings for the endpoint were no longer valid. The solution was to restart IIS to force the app to restart and the settings.ChunkRequest to be reset to a valid value. While this seems an obscure problem, the scale of Rackspace's infrastructure means somebody should definitely look at this for future versions of your cloud files integration library. Please let me know if anybody needs more info on this. |
Yeeees, this just happened again, and as before restarting IIS resolved the problem |
It's been happening to us as well, I just found this post while searching for a cause/resolution. It our case, IIS is not involved. I have a windows service that is responsible for moving files into the rackspace cloud. We'll get these errors in 5 - 15 minute bursts and then they go away. I assume this is an issue on the Rackspace side, but I'm not sure who to ask about it short of putting a ticket in and having them tell me they don't write the openstack client :-/ |
I now have a reliable way to reproduce this issue! |
Can you share that little tidbit with us or do you reckon you can fix it? |
I posted to Stack Overflow: |
Nice work mate and thanks for the update |
…ing chunked encoding (fixes openstacknetsdk#333)
More information... This issue results from a conflict between the Microsoft .NET Framework (Mono is not affected) and the proxy configuration used for load balancing the Object Storage service. In particular, the implementation of the .NET Framework assumes that web services will follow RFC 2145 §2.3, and uses this assumption as justification for caching whether or not the service supports HTTP/1.1. In certain situations, the Object Storage service does not follow a "SHOULD NOT" clause in the RFC, which breaks the assumption. The solution for the SDK is to handle the |
…ing chunked encoding (fixes openstacknetsdk#333)
…ing chunked encoding (fixes openstacknetsdk#333)
@mattjbrown @paulcarroll @nratcliff I can't send a pull request for resolving this issue until pull request #380 is merged. However, I would appreciate any commentary y'all have about the specific solution in 2d40127. |
Nice work tracking this down and implementing a fix so quickly! I read the response on SO and your solution makes sense based on 280Z28's description of ServicePoint's behavior. There's only one potential issue I can see, but I don't think it's going to apply here. I learned the hard way that ServicePoint has an internal timer that fires every at an interval that is .5 * MaxIdleTime milliseconds. Any value lower than 2 causes the timer to fire continuously and the drives the CPU right to 100%. Seems unlikely to be an issue for the 1 millisecond you've got it set to 0. Just mentioning it in case someone down the road claims the latest version of the client spikes their CPU. |
@nratcliff The guard that checks the |
Completely agree. You'd have to have the ProtocolViolationException and a ProtocolVersion < 1.1. Like I said, it's never going to be an issue. My overly cautious side felt compelled to mention that side effect of the MaxIdleTime property. |
Really nice work guys, thankyou so much for tracking this down. I'll be sure to give the fixed branch a try! |
I am also experiencing this issue whilst importing millions of files into Rackspace Cloud Files. Is there an eta on the pull request? Or would I be better off forking your patch? |
Yes that's exactly the type of load that induces the issue for us too. |
@paulcarroll Would you be interested to publish your fork publicly? I thought I had a fix but it hasn't worked. I still have another 8 million files still left to process! :-) |
yeah of course mate, not a problem, you can find it here: https://github.com/tempurer/openstack.net |
@paulcarroll Thanks Paul. Looks good. I also reduced the 4 hour timeout to something more suitable for my purposes. I had noticed the application hanging for long periods of time. I think that was the cause. |
@benpowell yep, that's a really good call, I think I'll do the same... and introduce a retry X times on timeout |
@paulcarroll your fork appears to be working successfully and these chunking errors fixed by @sharwell's fix have disappeared. This fix has really helped me. Thank you for all your help. |
…ing chunked encoding (fixes openstacknetsdk#333)
I'm using Openstack.Net to upload CSVs from my web application. I've notice that sporadically I get this exception for a few minutes at a time when trying to upload:
Like I mentioned, its been happening pretty inconsistently, but it happens often enough that its preventing the use of the API bindings in otherwise production-ready code.
The text was updated successfully, but these errors were encountered: