Skip to content
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

Problems with > ~50 uploads in a single request #20

Open
ghost opened this issue Aug 7, 2010 · 0 comments
Open

Problems with > ~50 uploads in a single request #20

ghost opened this issue Aug 7, 2010 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 7, 2010

I'm trying to upload files from a Java applet through mod_porter/Passenger 2.2.15/Apache 2.2.3/Ruby 1.8.7/Rails 2.3.5.

Everything works as expected when I upload 5, 10, or even 50 files at a time. If I try a batch of ~60, however, I only receive the params hashes (content_type, path, etc.) for the first ~55 files. I've reviewed the mod_porter debug log, and it seems that the files are all being recognized and processed by mod_porter. Note I am able to upload an arbitrary number of files to a PHP backend using the same applet, so I believe the applet is forming the POST correctly.

Can you help determine what's causing this? It occurs each attempt, regardless of which files I upload and their sizes (the cutoff point varies, though, depending on which files I upload).

Relevant log data:
mod_porter Rails plugin expects all 62 files:
Processing ["FileBody_0", "FileBody_1", "FileBody_2", "FileBody_3", "FileBody_4", "FileBody_5", "FileBody_6", "FileBody_7", "FileBody_8", "FileBody_9", "FileBody_10", "FileBody_11", "FileBody_12", "FileBody_13", "FileBody_14", "FileBody_15", "FileBody_16", "FileBody_17", "FileBody_18", "FileBody_19", "FileBody_20", "FileBody_21", "FileBody_22", "FileBody_23", "FileBody_24", "FileBody_25", "FileBody_26", "FileBody_27", "FileBody_28", "FileBody_29", "FileBody_30", "FileBody_31", "FileBody_32", "FileBody_33", "FileBody_34", "FileBody_35", "FileBody_36", "FileBody_37", "FileBody_38", "FileBody_39", "FileBody_40", "FileBody_41", "FileBody_42", "FileBody_43", "FileBody_44", "FileBody_45", "FileBody_46", "FileBody_47", "FileBody_48", "FileBody_49", "FileBody_50", "FileBody_51", "FileBody_52", "FileBody_53", "FileBody_54", "FileBody_55", "FileBody_56", "FileBody_57", "FileBody_58", "FileBody_59", "FileBody_60", "FileBody_61"]

mod_porter log shows processing of all files (up to an including 61):
[PORTER_LOG] Handling Upload
[PORTER_LOG] FileBody_61
[PORTER_LOG] Appears there was a file, continuing
[PORTER_LOG] appending sub param
[PORTER_LOG] filename
[PORTER_LOG] %2FUsers%2Fa%2FDesktop%2Fimages%2Fbutton_send_message.gif
[PORTER_LOG] appending sub param
[PORTER_LOG] content_type
[PORTER_LOG] application%2Foctet-stream%3B+charset%3DISO-8859-1
[PORTER_LOG] appending sub param
[PORTER_LOG] path
[PORTER_LOG] %2Ftmp%2FapreqSmt874
[PORTER_LOG] Signing Filename
[PORTER_LOG] {SHA}s1z1XzoFa8FFhrdkxAWx1CPi2Cc=
[PORTER_LOG] appending sub param
[PORTER_LOG] signature
[PORTER_LOG] s1z1XzoFa8FFhrdkxAWx1CPi2Cc%3D
[PORTER_LOG] Writing plain parameter
[PORTER_LOG] FilePath_61
[PORTER_LOG] FilePath_61=button_send_message.gif&
[PORTER_LOG] Writing plain parameter
[PORTER_LOG] RealFilePath_61
[PORTER_LOG] RealFilePath_61=%2FUsers%2Fa%2FDesktop%2Fimages%2Fbutton_send_message.gif&
[PORTER_LOG] Writing plain parameter
[PORTER_LOG] FileSize_61
[PORTER_LOG] FileSize_61=1874&
[PORTER_LOG] Writing plain parameter
[PORTER_LOG] FileLastModified_61
[PORTER_LOG] FileLastModified_61=Feb+18%2C+2010+10%3A35%3A38+AM&
[PORTER_LOG] Writing plain parameter
[PORTER_LOG] FileIndex_61
[PORTER_LOG] FileIndex_61=61&
[PORTER_LOG] Writing plain parameter
[PORTER_LOG] FileDescription_61
[PORTER_LOG] FileDescription_61=null&
[PORTER_LOG] Writing plain parameter
[PORTER_LOG] ThumbnailRotateAngle_61
[PORTER_LOG] ThumbnailRotateAngle_61=0&
[PORTER_LOG] Writing plain parameter
[PORTER_LOG] ThumbnailCropX_61
[PORTER_LOG] ThumbnailCropX_61=0&
[PORTER_LOG] Writing plain parameter
[PORTER_LOG] ThumbnailCropY_61
[PORTER_LOG] ThumbnailCropY_61=0&
[PORTER_LOG] Writing plain parameter
[PORTER_LOG] ThumbnailCropWidth_61
[PORTER_LOG] ThumbnailCropWidth_61=0&
[PORTER_LOG] Writing plain parameter
[PORTER_LOG] ThumbnailCropHeight_61
[PORTER_LOG] ThumbnailCropHeight_61=0&

However, Rails does not receive the params hashes (there is a FileBody_xx hash up to 55, then there are no more.

One possible clue is that there are many extra post variables which I believe come from the Java applet ("FileSize_32"=>"768", "FileDescription_18"=>"null", "ThumbnailCropHeight_30"=>"0", etc.). Could mod_porter not be allocating enough space for all of the variables?

Thanks for your ideas!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants