You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Doss Markus <Ma...@rhein-zeitung.net> on 2003/02/03 17:14:34 UTC

Out of Memory problem

Hi axis people
 
I wrote some services which transports image data to a server. I've done
this with apache soap. Now I transported a 8 MB tif image to the server
and run out of memory. Actually I don't use attachments for the service.
I code the image data base64 and sent this data with some additional
data to server. The apache soap faq recomment to use axis. Are there any
solutions and examples in axis to handle large files for transport to a
server. The image data could by much larger than 20 MB.
 
Thanks
 
Markus

Re: Out of Memory problem

Posted by Elmar Fasel <El...@web.de>.
Hi Markus,

Markus Doss schrieb:

> I wrote some services which transports image data to a server. I've done 
> this with apache soap. Now I transported a 8 MB tif image to the server 
> and run out of memory. Actually I don't use attachments for the service. 
> I code the image data base64 and sent this data with some additional 
> data to server. The apache soap faq recomment to use axis. Are there any 
> solutions and examples in axis to handle large files for transport to a 
> server. The image data could by much larger than 20 MB.

If you get a java.lang.OutOfMemoryError exception you could try to 
increase the maximum size of the memory allocation pool of the virtual 
machine.

See http://java.sun.com/j2se/1.4.1/docs/tooldocs/linux/java.html :


<quote>
-Xmxn
     Specify the maximum size, in bytes, of the memory allocation pool. 
This value must a multiple of 1024 greater than 2MB. Append the letter k 
or K to indicate kilobytes, or m or M to indicate megabytes. The default 
value is 64MB. Examples:

        -Xmx83886080
        -Xmx81920k
        -Xmx80m
</quote>

Regards,
  Elmar


Re: Out of Memory problem

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Brian Ewins" <Br...@btinternet.com>
To: <ax...@xml.apache.org>
Sent: Monday, February 03, 2003 09:48
Subject: Re: Out of Memory problem


> Steve Loughran wrote:
> > send it as an attachment. That works for files that size. base64
encoding is
> > very slow as well as being inefficient; XML parsers dont like strings
that
> > size.
>
> Are we sure it's the XML parser thats at fault here? I'm a little
> interested in this one, as some of the stuff we do does the base64 thang
> (for historical reasons - its not our service at the other end). This
> isn't the first time I've seen people complain about OOME's with Axis,
> but there's no way you should OOM base64 transforming an 8Mb file -
> gzipped or not. The previous report, IIRC, was for a 2Mb string, not
> encoded. While these practices arent ideal, it makes me wonder if there
> is a bug that needs looking at.

I dont know where the problem is, and if you can find it, great.

But I dont think 'we cant base 64 an 8mb file and add it inline' is going to
be a priority on my list.


Re: Out of Memory problem

Posted by Brian Ewins <Br...@btinternet.com>.
Steve Loughran wrote:
> send it as an attachment. That works for files that size. base64 encoding is
> very slow as well as being inefficient; XML parsers dont like strings that
> size.

Are we sure it's the XML parser thats at fault here? I'm a little 
interested in this one, as some of the stuff we do does the base64 thang 
(for historical reasons - its not our service at the other end). This 
isn't the first time I've seen people complain about OOME's with Axis, 
but there's no way you should OOM base64 transforming an 8Mb file - 
gzipped or not. The previous report, IIRC, was for a 2Mb string, not 
encoded. While these practices arent ideal, it makes me wonder if there 
is a bug that needs looking at.

Markus, if you have a simple service which has this problem, and can 
send me the code, I'll investigate. If you send me the results of 
running fingerprint.jsp in your axis webapp as well, that would help - 
it may be the problem only shows up with a particular jdk or parser.

Cheers,
	Baz


Re: Out of Memory problem

Posted by Steve Loughran <st...@iseran.com>.
send it as an attachment. That works for files that size. base64 encoding is
very slow as well as being inefficient; XML parsers dont like strings that
size.

----- Original Message -----
From: "Doss Markus" <Ma...@rhein-zeitung.net>
To: <ax...@xml.apache.org>
Sent: Monday, February 03, 2003 08:14
Subject: Out of Memory problem


Hi axis people

I wrote some services which transports image data to a server. I've done
this with apache soap. Now I transported a 8 MB tif image to the server
and run out of memory. Actually I don't use attachments for the service.
I code the image data base64 and sent this data with some additional
data to server. The apache soap faq recomment to use axis. Are there any
solutions and examples in axis to handle large files for transport to a
server. The image data could by much larger than 20 MB.

Thanks

Markus