Re: Transfer Large binary data from client to server uses too much heap memory

From: Toby Hede <toby.hede@xxx.biz>
Date: Tue Apr 26 2005 - 18:34:18 PDT

I struggled with this issue a while ago, and the limit is Java itself.
Can't remember preceisely where, but the the runtime uses buffers in a
naive way that basically results in buffer memory being copied. Using
out of the box URLConnections the limit seems to be about 10mb. I had to
write my own socket-level code to get large files working (largest
transferred so far is 700mb CD ISO).

albert wrote:

>I wrote a java client to send a 95mb of file to a hessian servlet using
>the latest version of hessian.
>
>The problem i have is that the client needs at least 700mb of heap in
>order to send. Otherwise, i receive OutOfMemoryError.
>
>Please see the attached sources. Any hints are mostly welcome.
>
>Thanks a lot.
>
>
>
>

-- 
Toby Hede
Software Engineer
WebAlive Technologies Pty Ltd
Level 1, Innovation Building, Digital Harbour
1010 La Trobe Street
Docklands Melbourne VIC 3000
P: +61 3 9934 0888
F: +61 3 9934 0899
E: toby.hede@xxx.biz
W: www.webalive.biz
"Your Business, Your Web, Your Control."
 
This email (including all attachments) is intended solely for the named addressee. It is confidential and may contain legally privileged information. If you receive it in error, please let us know by reply email, delete it from your system and destroy any copies. This email is also subject to copyright. No part of it should be reproduced, adapted or transmitted without the written consent of the copyright owner.  Emails may be interfered with, may contain computer viruses or other defects and may not be successfully replicated on other systems. We give no warranties in relation to these matters. If you have any doubts about the authenticity of an email purportedly sent by us, please contact us immediately.
Received on Tue 26 Apr 2005 18:34:18 -0700

This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:16:41 PDT