Hi, I've managed to get our DSpace instance (on Tomcat 7) to upload >2GB files. I can help, there's a "funny" mix of config options you need to set up. Let me know how things go with following Chris' advice.
--Hardy ________________________________________ From: Baldur Dae [baldur....@gmail.com] Sent: Friday, February 26, 2016 4:52 PM To: Tomcat Users List Subject: Re: Uploading large files Hi Chris! Thank you so much for your quick response. I'll have a look and I'll come back here with my progress. 2016-02-26 17:30 GMT+01:00 Christopher Schultz <ch...@christopherschultz.net >: > Baldur, > > On 2/25/16 4:44 PM, Baldur Dae wrote: > > I have a Primefaces webapp which lets users upload files up to 50MB and > > saves posted files into Alfresco (located in another tomcat machine). > I've > > successfully configured it to avoid Heap exceptions but it is very slow > > and has a huge impact in CPU load. > > If you use Tomcat to upload your files, it should not be using a lot of > CPU, nor should it require a great deal of memory. Tomcat can be > configured to put the in-progress uploading file onto the disk instead > of in memory. There is a size threshold that triggers this to avoid the > foolishness of storing 50MiB of data in the heap during an upload. > > > Basically, the configuration has involved these steps: > > - web.xml (PrimeFaces FileUpload Filter): thresholdSize set to 1MB > > PrimeFaces upload filter. This is the component performing the upload, > not Tomcat. Please review the configuration of this filter. Perhaps > there are trade-offs being made. > > > - Tomcat: maxPostSize parameter set to 0 > > Does the PrimeFaces upload filter use POST or something else? (POST is > typical, but it could be a PUT) > > > - Webapp: saves posted file using InputStream ( > > > http://stackoverflow.com/questions/10326460/how-to-avoid-outofmemoryerror-when-uploading-a-large-file-using-jersey-client > > ) > > > > How can I improve it? Is it just a hardware problem? > > Probably not a hardware problem. The great thing about processes that > are taking a lot of time is that you can take some thread dumps[1] to > see what the process is doing. > > -chris > > [1] > > http://wiki.apache.org/tomcat/HowTo#How_do_I_obtain_a_thread_dump_of_my_running_webapp_.3F > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org