ITS Up/Down: upload of big files

Symptom
Trying to upload a big file gives the following error in the java console: “java.lang.OutOfMemoryError: Java heap space”.
Reason and Prerequisites
The upload of documents in ITS is done by an applet running in the java virtual machine of the browser.
This error arises due to restrictions of Sun’s jvm:
1.)The default maximum heap space of the SUN jvm in the browser is 64 MByte.
2.)The whole file, when transferred through HTTP to the ITS, is collected first in a buffer in java. (See bug 4212479, 6526165 and 5026745 in Sun’s java bug database (http://bugs.sun.com/bugdatabase)).
Result: the java heap space may be too small for uploading files, bigger than about 20MByte.
Solution
There are 3 workarounds:
a) Increase manually the java virtual machine heap size on the client computer. (Open the “java control panel”. click tab “java” and click button “view”. Then add e.g. the following runtime parameters to column “java runtime paramters”: -Xms128M -Xmx512M. In this example the initial heap size would be 128MByte and the maximum heap size 512MByte).
b) First implement the support package, belonging to your ITS version.
Then add the service parameter ~webgui_updown_upload_big_file = 1 to the icf service node (webgui).
Remark: this solution uses a chunked http request to transfer the file data to the ITS. For this at least java 1.5 is needed on the client computer and HTTP protocol 1.1 must be used. Furthermore all proxies between the client browser and the ITS mustn’t block chunked http requests.
c) First implement the support package, belonging to your ITS version.
Then add the service parameter ~webgui_updown_upload_with_gzip = 1 to the icf service node (webgui).
Remark: this solution uses compressed http requests to transfer the file data to the ITS.
This note will be updated, if the exact patch number is known.
For more information on how to download and save ITS Support Packages
refer to Note 563161.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Leave a Comment