Attachment upload fails with "HTTP error."
Asked by Daniel Urst?ger:

Hello there,

I wonder if somebody can help with my problem. Attachment uploads do generally work,  
but I got a rather big PDF here. It is roughly 95MB in size. Upload of smaller files up to 20MB work,  
but the 95MB file fails all the time with "HTTP error." for some reason.

We run Confluence behind a Apache proxy to have SSL encryption. After looking around and googling I checked the Apache error log and a few other things but couldn t find the problem. Maybe somebody got a clue for me?  

Thanks!

We run Confluence 4.3.5 by the way.

Kind regards,  
Daniel


Answers:
author: C. Faysal
body: how is Attachment Storage configured?

if it's set to Database you may adjust "max_upload_size" in your Database config file (i.e. my.cnf)

comments: author: C. Faysal
body: try after adding max_upload_size


author: Daniel Urst?ger
body: Good point, totally forgot to mention that! I use MySQL als storage backend, and I set the max_packet_size to 1GB. So I guess that is also not it.


author: Daniel Urst?ger
body: max_upload_size in the MySQL config?


author: C. Faysal
body: argh maybe max_upload_size is the wrong parmater and i am mixing it up with php....

is there a timeout value wich is beeing hit during the upload process?


author: C. Faysal
body: ok i rechecked this...the table for attachmentdata

DATA is longlob which theoretically should allow up to 2GB of filesize...

there must be something between the database and the application


author: C. Faysal
body: hmmm i switched attachment storage from database to file system....works...150MB uploaded w/o problem

same file after setting back to Database...works as well.

try decreasing the limit...

my.cnf

max_allowed_packet=512M

confluence

Attachment Maximum Size 536870912 Bytes (512.00 MB)


author: Daniel Urst?ger
body: I just checked the Confluence Logs and they are pretty much empty as well :(  

so I guess it is neither Apache nor Confluence itself causing the problem.

Thanks guys for all your input, will look now into possible problem with MySQL :)


author: PeterKoczan
body: Hey Daniel,

Another clue would be to check the attachment size settings: <https://confluence.atlassian.com/display/DOC/Configuring+Attachment+Size>

Regards,

Peter

comments: author: Daniel Urst?ger
body: Thanks Peter, but sadly I already set that to over 500MB.


author: PeterKoczan
body: Could you describe the error message in detail? Do you use any web proxy in between? Do you see any related messages in \<CONFLUENCE-HOME\>/logs/atlassian-confluence.log? Are you sure it is the size of the file, not the file name for example?


author: Daniel Urst?ger
body: Well, that is the full error message I see in my browser. It comes up within the upload window, after the whole file has been uploaded (judging by the progress bar of Google Chrome). I will attach the log file soonish, I am currently not in the office :)

About the Proxy, well Apache gets the Requests and forward them to Confluence, this is for the SSL setup, as desribed in the Atlassian Wiki. I can also upload attachments with smaller size without any issue. And I also tried to upload a file smaller with the same name and that worked.


author: PeterKoczan
body: I see, I believe the logs may tell additional information, once you have access to them and can post it here, I'd be happy to take a look. Have you also opened a support ticket for this issue already?


author: Bhushan Nagaraj
body: Hi Daniel,

You might want to check the LimitRequestBody directory in your apache conf.

More information available at <http://httpd.apache.org/docs/current/mod/core.html#limitrequestbody>

comments: author: Daniel Urst?ger
body: Hi Bhushan,

I checked but also seems like that isn t the problem.

Greetings,  
Daniel