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

Nick Porter nick.porter at tradar.com
Thu Apr 19 12:47:42 CEST 2012

Thanks for following up with this issue Rüdiger, it's much appreciated! At least this finally resolves for me the problem in as far as I now know that it's not the Apache/Tomcat configs that are causing it.

Your suggestion to use a 'decoupled DB', Apologies for being hard of thinking but is this something that can be transparently coded within OpenCMS or will the byte array limitation you mentioned require this functionality to be completely separated from the website we host in it?

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: 19 April 2012 09:48
To: The OpenCms mailing list
Cc: Nick Porter
Subject: Re: [opencms-dev] FW: FW: Max File Upload Size.

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