tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: mod_jk restarting during uploads of large files
Date Thu, 07 Jul 2011 19:47:40 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

André ,

On 7/7/2011 10:27 AM, André Warnier wrote:
> Since this concerns large files upload, I wonder if something along 
> these lines is happening :
> 
> A file upload is a POST request, usually with an 
> enctype=multipart/form-data format (similar to an email with
> attachments). Furthermore, for sending this file, the browser is
> going to encode the file using Base64 encoding, which increases the
> brutto size by at least 1/3.  So your 500 MB file becomes something
> like 700 MB in the POST.

I don't think any browser does base64 encoding of files.

> Now let's imagine that by default Tomcat is buffering this in memory 
> until it has read the whole POST and can start parsing it.  That
> could easily cause some memory issues.

Tomcat itself (at least v5.5) does not handle file uploads itself. Most
people either roll their own (bad) or use commons-fileupload or
something similar.

Any buffering of any consequence will be done by a non-Tomcat component,
but could be easily configured to take up a lot of memory.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk4WDVwACgkQ9CaO5/Lv0PDQQACfZ+LLUuDi6AvJAFW12Q8cMXgr
INwAniZcjDb1kvWdbf+taynqyl+A40nn
=0jra
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message