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

Rüdiger Kurz r.kurz at alkacon.com
Thu Apr 19 10:48:00 CEST 2012

Hi Nick,

I did some research with the following results:

OpenCms internally handles content as byte array. A byte[] with size of 
the maximum 32-bit signed integer would require 2GB of contiguous 
address space. So with a byte[] the maximum memory you can address is 
2G. For this reason files larger than 2G can not be uploaded.

For those files, that are smaller than 2G but larger than the heap space 
of your JVM a out of memory exception will be thrown and the upload 
hangs up. So if you want to upload a 2G file the heap space of the 
tomcat's JVM has to be large enough.

In general you should consider to use a decoupled data storage 
(catchword: Multimedia Databases) for huge files. Typically you store 
the binary data on the real file system and the meta data inside the 

- Rüdiger

Kind Regards,


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