-
Notifications
You must be signed in to change notification settings - Fork 256
EOFError (bad content body) when uploading a file #125
Comments
Seeing the same thing when handling file uploads manually without paperclip (under rails 3); webrick works fine. |
I was having this issue as well, using carrierwave. Using mongrel or webrick was fine. Upgrading to pow 3.1 seemed to take care of it for me. |
Updated to Pow 3.1 also. I'm hoping this solves what was a seemingly random error for me. I was only getting this error maybe once every 20-30 uploads. |
also seeing this |
+1 for this bug. I did a bit of digging and discovered the issue might be fixed if rack-mount were updated something higher than version 0.6.14 however Rails 3.0.7 specifies "~> 0.6.14" so it is not possible to use anything higher than that in a Gemfile. |
I get this on every upload regardless of file handling lib (carrierwave/paperclip/manual) with pow 0.3.1 and rack-mount 0.6.14 |
I'm receiving the same problem as well pow 0.3.1, rack-mount 0.8.1, carrierwave 0.5.4 |
me too pow 0.3.1, rack-mount 0.8.1, paperclip |
I know its not a real solution, but I just opted for uploading to S3 instead of local storage. |
I encountered the same issue with paperclip but realized I had to provide a content_type validation. After looking at the request from the dev tools in browser, I realized it was only accepting image content types, which was not what I was hoping to upload. (For some reason this is the default for paperclip.) has_attached_file :audio |
I run into this bug with a Rails 3.0.9 app and a simple upload field (no paperclip, carrierwave etc plugin) with pow 0.3.1 |
Had the same issue with 0.3.0. Upgrading to 0.3.1 didn't solve the problem. It made it even worse, cause pow stopped working completely. |
I just had this very error. |
+1 Same problem for me |
+1 |
2 similar comments
+1 |
+1 |
I was getting this error with paperclip. Files at 5mb gave the error. Same files resized down to under 1mb uploaded successfully. I did not test various other sizes to see if there was a tipping point. |
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
Saw this problem too. Works in WebRick. Works in Passenger in production. Works from time to time with Pow, most of the time fails with this very same error. If I have some time (a very limited resource !) I'll try to make a contrived example that exhibits this problem. But, due to the elusive nature of the problem, I fear it won't show up on the developers' machine... |
+1 |
I too am seeing this on 0.3.2 |
Happens to me every time I try to upload a file through Paperclip. I'm trying to upload 2.5MB files. Works in WEBrick. |
+1 |
This is not related to the X-Sendfile bug, is it? |
@josephers - It's not related to the X-Sendfile bug. This is bugged in Rails 3.0 too. |
+1 Fails in Rails with Pow 0.4.1 using a The request goes through, but all the submitted parameters are stripped and running If I use |
+1 Seeing the same result as @theodorton. |
+1 |
+1 - Rails 3.2.13, Rack 1.4.5, Pow 0.4.1 I actually only got an "obfuscated" version of the error:
I then spend quite some time digging into rack to finally figure out that it's throwing a "bad content body" in rack-1.4.5/lib/rack/multipart/parser.rb:130. Switched to unicorn and all seems fine now. |
+1 |
1 similar comment
+1 |
No problem On 17/10/2013, at 9:22 PM, Andrei Filimonov [email protected] wrote:
|
+1 |
2 similar comments
+1 |
+1 |
+1 Definitely linked to file size. |
+1 Definitely limited to file size. |
+1 Just experienced this as well. 15Mb file causes overall form to fails with "WARNING: Can't verify CSRF token authenticity" message. Mac OS X 10.8.5, Safari 6.1, Carrierwave 0.9.0, Rails 3.2.16. I confirmed that a 77Kb file works fine. I also confirmed that the problem doesn't occur with webrick with the 15Mb file. |
+1 We're having the same problem, BUT: This happens after uploading a file, then right away uploading a second file. If we only try to upload one file (or if we wait long enough) everything works correctly. The file size is of 700kb. So possibly not an issue on file size, but on the amount of memory used to process the files. |
+1 (file size related as well) |
Is it Pow-specific? Or should I be careful pushing the same code to production as well? |
I had this error always when using pow. no problems, with thin or webrick or in production. That's why I don't use Pow anymore. |
Having this problem as well! |
Same here. Pow + Carrierwave |
Same issue here, pow 0.4.1, Rails 2.3, REE 1.8.7. Small files work, larger file (this one has ~10MB).
|
Hi All, If we only report bug, not identify the root reason, we will can't get it resolved. anyone can help us and give some hints. |
I can consistently reproduce this (or at least related) problems using pow with both rails and sinatra. A simple app showing this is here: https://github.com/tomafro/pow-large-upload-failure. It works using both |
For what it's worth, I put a bunch of debug logs into the Nack::Server code (which is where the Ruby process receives data from the nodejs HTTP server).
Weirdly, the actual start of the request body then appears mangled into the buffer that Nack::Server is piecing together. However the tail of the request body seems to reliably come at the end of the buffer. It kind of seems like the body chunks are getting received out of order. |
@jdelStrother That's really useful, thanks. Looks like we'll need to look a little higher up the chain to see what's mangling the data. |
d3f4836 should fix this data mangling bug |
Outstanding, thanks. I just transferred a 50MB file with no problems, which I've never been able to do before on Pow. |
This is awesome! I understand that individual issues can't dictate new released, but I hope you can mint a new version soon :) |
@sandstrom Freshly baked 0.4.3 release now available |
@tomafro Awesome, thanks! ⛵ |
Thanks for fixing this one. |
When using Paperclip to upload a file, the file upload instantly fails, logging "EOFError (bad content body):"
The exact same operation works with Webrick
The text was updated successfully, but these errors were encountered: