You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michail Popov <m....@algovision.com> on 2000/04/18 15:32:14 UTC

Out of memory with HttpOutputstream

hi...
to transfer a large amount (xMb) of data between servlets i do a POST
using
URLConnection/OutputStream
unfortunatelly the connections OutputStream is always mapped to a 
ByteArrayOutputstream by sun.net.www.protocol.http.HttpURLConnection so 
I run out of memory eventually....
a quick and dirty solution in that particular case was to extend some of
the 
sun.net.www.protocol.http and sun.net.www.http classes 
-> depends on jdk1.1 classes but didn't have to implement Http all over

has someone a better solution? maybe tomcat could register its own
HttpHandler/HttpURLConnection which provides a direct Outputstream?

ciao
michail

Re: Out of memory with HttpOutputstream

Posted by Michail Popov <m....@algovision.com>.
yes....it doesn't help if the amount of data is larger than (any)
available memory or,
with smaller pieces, a number of servlets are running this task

gtallen schrieb:
> 
> Have you tried looking at starting your JVM (java) with options
> to boost the memory? Just a thought.
> 
> Michail Popov wrote:
> >
> > hi...
> > to transfer a large amount (xMb) of data between servlets i do a POST
> > using
> > URLConnection/OutputStream
> > unfortunatelly the connections OutputStream is always mapped to a
> > ByteArrayOutputstream by sun.net.www.protocol.http.HttpURLConnection so
> > I run out of memory eventually....
> > a quick and dirty solution in that particular case was to extend some of
> > the
> > sun.net.www.protocol.http and sun.net.www.http classes
> > -> depends on jdk1.1 classes but didn't have to implement Http all over
> >
> > has someone a better solution? maybe tomcat could register its own
> > HttpHandler/HttpURLConnection which provides a direct Outputstream?

Re: Out of memory with HttpOutputstream

Posted by gtallen <gt...@home.com>.
Have you tried looking at starting your JVM (java) with options
to boost the memory? Just a thought.

Michail Popov wrote:
> 
> hi...
> to transfer a large amount (xMb) of data between servlets i do a POST
> using
> URLConnection/OutputStream
> unfortunatelly the connections OutputStream is always mapped to a
> ByteArrayOutputstream by sun.net.www.protocol.http.HttpURLConnection so
> I run out of memory eventually....
> a quick and dirty solution in that particular case was to extend some of
> the
> sun.net.www.protocol.http and sun.net.www.http classes
> -> depends on jdk1.1 classes but didn't have to implement Http all over
> 
> has someone a better solution? maybe tomcat could register its own
> HttpHandler/HttpURLConnection which provides a direct Outputstream?
> 
> ciao
> michail
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org