Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DAA5A4534 for ; Thu, 7 Jul 2011 19:48:13 +0000 (UTC) Received: (qmail 50612 invoked by uid 500); 7 Jul 2011 19:48:10 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 50480 invoked by uid 500); 7 Jul 2011 19:48:09 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 50470 invoked by uid 99); 7 Jul 2011 19:48:09 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jul 2011 19:48:09 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [76.96.62.16] (HELO qmta01.westchester.pa.mail.comcast.net) (76.96.62.16) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jul 2011 19:48:00 +0000 Received: from omta01.westchester.pa.mail.comcast.net ([76.96.62.11]) by qmta01.westchester.pa.mail.comcast.net with comcast id 57jR1h0030EZKEL517ngA3; Thu, 07 Jul 2011 19:47:40 +0000 Received: from [192.168.1.104] ([50.133.145.196]) by omta01.westchester.pa.mail.comcast.net with comcast id 57nf1h00D4ETvKE3M7nfyh; Thu, 07 Jul 2011 19:47:40 +0000 Message-ID: <4E160D5C.3010008@christopherschultz.net> Date: Thu, 07 Jul 2011 15:47:40 -0400 From: Christopher Schultz User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20110624 Thunderbird/5.0 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: mod_jk restarting during uploads of large files References: <20110704172736.141422tpj9su9zhc@mail.alt-v.co.uk> <4E14CD7D.10802@kippdata.de> <20110707093511.80201zzo5pbn590k@mail.alt-v.co.uk> <4E15C237.5020703@ice-sa.com> In-Reply-To: <4E15C237.5020703@ice-sa.com> X-Enigmail-Version: 1.2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org -----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