From: jian c. <che...@gm...> - 2005-04-27 21:46:24
|
Hi,=20 I got more information regarding the memory issue. The stack trace is: java.lang.OutOfMemoryError: (class: org/mortbay/http/EOFException)=20 =09at org.mortbay.http.BufferedOutputStream.flush(BufferedOutputStream.java= :206) =09at org.mortbay.util.ByteBufferOutputStream.ensureSpareCapacity(ByteBuffe= rOutputStream.java:357) =09at org.mortbay.util.ByteBufferOutputStream.write(ByteBufferOutputStream.= java:197) =09at org.mortbay.http.BufferedOutputStream.write(BufferedOutputStream.java= :146) =09at org.mortbay.http.HttpOutputStream.write(HttpOutputStream.java:423) =09at org.mortbay.jetty.servlet.ServletOut.write(ServletOut.java:54) =09at java.util.zip.DeflaterOutputStream.deflate(Unknown Source) =09at java.util.zip.DeflaterOutputStream.write(Unknown Source) =09at java.util.zip.GZIPOutputStream.write(Unknown Source) =09at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(Unknown Source) =09at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(Unknown Source) =09at sun.nio.cs.StreamEncoder.write(Unknown Source) So, could it be a jetty issue? Thanks, Jian On 4/27/05, jian chen <che...@gm...> wrote: > Thanks for your suggestions. I looked at the jdk source code for > GZIPOutputStream implementation, and it seems to me that they also use > a buffer internally. And as I recall, GZIP works in zipping data in > chunks. So, it should send out a chunk once it is done rather than > buffering them all. >=20 > Jian >=20 > On 4/27/05, Russell Howe <rus...@wr...> wrote: > > jian chen wrote: > > > Hi, > > > > > > This strange problem has been bugging me for 2 days. I have the > > > following GZIPOutputStream on top of the servlet response > > > > [jian] > > > > > So, when the velocity template page is huge, then, I get a out of mem= ory error. > > > > > > Any ideas? > > > > Increase the amount of memory available to Java? I guess > > GZIPOutputStream isn't capable of compressing on the fly, and buffers > > the whole input before gzipping it? > > > > -- > > Russell Howe > > rus...@wr... > > > > Today's Nemi: http://www.metro.co.uk/img/pix/nemi_apr27.jpg > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Tell us your software development plans! > > Take this survey and enter to win a one-year sub to SourceForge.net > > Plus IDC's 2005 look-ahead and a copy of this survey > > Click here to start! http://www.idcswdc.com/cgi-bin/survey?id=3D105hix > > _______________________________________________ > > jetty-discuss mailing list > > jet...@li... > > https://lists.sourceforge.net/lists/listinfo/jetty-discuss > > > |