[opencms-dev] FW: FW: Max File Upload Size.

Rüdiger Kurz r.kurz at alkacon.com
Thu Apr 5 12:53:09 CEST 2012


Hi Nick,

the tomcat AJP connector has a limit of packet size (default: 8192 
Bytes, the maximum value is 65536 Bytes):

As you said you have added a line like:
# worker.properties
worker.worker1.max_packet_size=65536

"This attribute sets the maximal AJP packet size in Bytes. The maximum 
value is 65536. If you change it from the default, you must also change 
the packetSize attribute of your AJP connector on the Tomcat side! The 
attribute packetSize is only available in Tomcat 5.5.20+ and 6.0.2+."

So goto the server.xml of your tomcat and check if you have added an 
attribute packetSize=65536 to the definition of your connector.

regards
Rüdiger

[1] http://tomcat.apache.org/connectors-doc/reference/workers.html
[2] 
http://builddeploy.blogspot.de/2009/04/resolving-http-error-413-request-entity.html

Am 05.04.2012 12:27, schrieb Nick Porter:
>
>
> Rüdiger,
>
> Yes, I have a v8.0.1 OpenCMS installation.
>
> ...and yes, at this point I believe the error is being generated by the Tomcat6 server although I'm no Java dev so I could be wrong here as I have nothing other than OpenCMS to test whether the Tomcat6 server can successfully process a>2GB upload. If I had something basic I could post a file to at least I'd be able to differentiate between the two.
>
> The Basic and Applet upload variants both produce the same 413 error. Having problems getting WebKit to fire up on my Win7 workstation but will post back once I've completed a good test.
> --
> np
>
>
>
> --
> Tradar Limited  is a limited company registered in England and Wales. Registered number: 3431380.
> Registered office: 20-21 Jockey's Fields, London. WC1R 4BW
>
> -----Original Message-----
> From: Rüdiger Kurz [mailto:r.kurz at alkacon.com]
> Sent: 27 March 2012 13:48
> To: The OpenCms mailing list
> Cc: Nick Porter
> Subject: Re: [opencms-dev] FW: FW: Max File Upload Size.
>
> Hi Nick,
>
> do you use a OpenCms>= v8? And is the assumption correct that the 413
> Request Entity too large does now come from tomcat?
>
> OpenCms features different upload variants that can be selected in the
> workplace user preferences. To make sure the upload variant you choose
> does not cause the problem, please try all possible variants (GWT-Upload
> / Basic-Upload / Upload-Applet). If all of them end up with 413 the
> server configuration is perhaps responsible.
>
> Note: Run your tests for GWT-Upload with a browser that supports form
> based HTML5 upload e.g. Webkit not FF or IE
>
> regards
> Rüdiger
>> Additional:
>>
>> Apologies, the HTTP error returned when uploading to the admin workspace is in fact;
>>
>> HTTP/1.1 413 Request Entity Too Large.
>>
>> I could only capture this via a packet trace though as the workspace upload and progress dialog just hangs until cancelled.
>>
>>
>> Rüdiger, thanks for the response.
>>
>> Yes, this is the approach I eventually took to rule out the Apache/connector parts of the puzzle. I am now connecting directly to the Tomcat6/OpenCMS/Webapp via the proxy port. I have to munge the linked addresses so as not to interrupt the live site but it works for testing purposes.
>>
>> Just under 2GB uploads fine. Just over and I get an HTTP/1.1 400 Bad Request returned.
>>
>> I also tried doing this through the OpenCMS admin interface uploading directly to the file system with the same result.
>>
>> My prime suspect at this point in time is the Tomcat6 server but I'm out of ideas as to what can be tweaked to allow uploads>2GB.
>>
>> Hi,
>>
>> what happens if you try to upload the file(s) directly to OpenCms
>> without ajp and apache in front of the Servlet-Container?
>>
>> regards
>> Rüdiger
>>
>> On 27.03.2012 11:23, Nick Porter wrote:
>>> Does anybody else have any more ideas as to what might be causing this or suggestions on what I might do to rectify it.
>>>
>>>
>>>
>>> Folks, I've been experiencing a problem uploading huge>2GB files to OpenCMS. I've gone all the way through the config Apache2 ->    mod_proxy_ajp ->    Tomcat6 and suspected just about everything along the way. After tweaking each config with the respective max file settings I'm beginning to wonder whether OpenCMS is actually able to handle file uploads of this magnitude.
>>>
>>> The last error I was able to digout was a 413 from the Apache server;
>>>
>>> The requested resource /opencms/system/modules/org.opencms.ade.upload/uploadAction.jsp
>>> Does not allow requests data with POST requests, or the amount of data provided in The request exceeds the capacity limit.
>>>
>>> Can anybody confirm whether OpenCMS can actually handle 2GB+ files being uploaded to the workplace and if it can are there any suggestions of what might be tweaked to allow this.
>>>
>>> I've added LimitRequestBody 0 to the Apache config and maxPostSize="12884901888" to the Tomcat connectors.
>>>
>>> I've been at this for days and am starting to lose the will to live. ;)
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>

-- 
Kind Regards,
Rüdiger.

-------------------

Visit OpenCms Days 2012 Conference and Expo September 24 to 25, 2012 in 
Cologne, Germany http://www.opencms-days.org

Rüdiger Kurz

Alkacon Software GmbH  - The OpenCms Experts
http://www.alkacon.com - http://www.opencms.org



More information about the opencms-dev mailing list