You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Eric Schneider <er...@centralparksoftware.com> on 2003/04/03 23:27:17 UTC

random java.lang.OutOfMemoryError exceptions

Hi,

Wondering if anyone has seen something similar to this before.  One of our tapestry apps throws random OutOfMemoryError exceptions.  Unfortunately, the trace doesn't point to anything specific in the app.

If someone has any ideas or pointers it would be much appreciated.  I'm not sure where to start.

I've attached the stack trace.

Thanks in advance,
Eric




RE: random java.lang.OutOfMemoryError exceptions

Posted by Mind Bridge <mi...@yahoo.com>.
Hi Eric,

The problem indeed appears to be in DataSqueezer, so one should definitely
check what objects are passed for "squeezing" and whether the application
does not have a memory leak somewhere (most profilers will do that). On the
other hand there may be a larger issue at play if the application is
deployed on Linux and the -Xmx option is not used.

For some reason, the default behaviour of the Linux JVM (be it HotSpot or
the Blackdown equivalent) is to use only physical memory. The OS may use
300M for cache, and it may have 1GB of virtual memory free, but should the
physical memory run out, the JVM starts throwing Out of Memory exceptions.

This is esily fixed by passing the -Xmx??? option when calling 'java'
(e.g. -Xmx500m). Once this option is present, the JVM starts behaving as it
behaves on other platforms -- starts using virtual memory and starts eating
into the cache if it is too large. Its default behaviour is different from
that on all other OSes I've seen, but what can you do.

I hope this is relevant.

Best regards,
-mb


-----Original Message-----
From: Eric Schneider [mailto:eric@centralparksoftware.com]
Sent: Friday, April 04, 2003 2:09 AM
To: Tapestry users
Subject: Re: random java.lang.OutOfMemoryError exceptions


Howard,

Thanks for the quick reply.  I'm trying to gather the details right now.
Unfortunately, I didn't work on this project at all.

I talked with the developer about encoding large objects in service
parameters.  He had mentioned that they do encode date objects
(java.util.Date?) as sp's, but besides that....nothing else.

Do you think this could be the problem?  For the time being I asked him to
use a simple string representation of the date instead.....hoping that this
will help.

e.

----- Original Message -----
From: "Howard M. Lewis Ship" <hl...@attbi.com>
To: "'Tapestry users'" <ta...@jakarta.apache.org>
Sent: Thursday, April 03, 2003 5:44 PM
Subject: RE: random java.lang.OutOfMemoryError exceptions


My guess would be that you are using the DataSqueezer to encode a
Serializable object.  The object is large.  Somewhere in the flow between
server to client back to server, the value is getting truncated and GZip
input stream is spinning out of control trying to deal with the corrupted
stream.

Best option: create a custom DataSqueezer adaptor for whatever type of data
your are trying to encode as a service parameter that can work more
efficiently than the SerializableAdaptor (which serializes, compresses using
GZip, then encodes using a URL-safe BASE64-like encoding).



--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



-----Original Message-----
From: Eric Schneider [mailto:eric@centralparksoftware.com]
Sent: Thursday, April 03, 2003 4:27 PM
To: tapestry-user@jakarta.apache.org
Subject: random java.lang.OutOfMemoryError exceptions


Hi,

Wondering if anyone has seen something similar to this before.  One of our
tapestry apps throws random OutOfMemoryError exceptions.  Unfortunately, the
trace doesn't point to anything specific in the app.

If someone has any ideas or pointers it would be much appreciated.  I'm not
sure where to start.

I've attached the stack trace.

Thanks in advance,
Eric








---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org



Re: random java.lang.OutOfMemoryError exceptions

Posted by Eric Schneider <er...@centralparksoftware.com>.
Howard,

Thanks for the quick reply.  I'm trying to gather the details right now.
Unfortunately, I didn't work on this project at all.

I talked with the developer about encoding large objects in service
parameters.  He had mentioned that they do encode date objects
(java.util.Date?) as sp's, but besides that....nothing else.

Do you think this could be the problem?  For the time being I asked him to
use a simple string representation of the date instead.....hoping that this
will help.

e.

----- Original Message -----
From: "Howard M. Lewis Ship" <hl...@attbi.com>
To: "'Tapestry users'" <ta...@jakarta.apache.org>
Sent: Thursday, April 03, 2003 5:44 PM
Subject: RE: random java.lang.OutOfMemoryError exceptions


My guess would be that you are using the DataSqueezer to encode a
Serializable object.  The object is large.  Somewhere in the flow between
server to client back to server, the value is getting truncated and GZip
input stream is spinning out of control trying to deal with the corrupted
stream.

Best option: create a custom DataSqueezer adaptor for whatever type of data
your are trying to encode as a service parameter that can work more
efficiently than the SerializableAdaptor (which serializes, compresses using
GZip, then encodes using a URL-safe BASE64-like encoding).



--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



-----Original Message-----
From: Eric Schneider [mailto:eric@centralparksoftware.com]
Sent: Thursday, April 03, 2003 4:27 PM
To: tapestry-user@jakarta.apache.org
Subject: random java.lang.OutOfMemoryError exceptions


Hi,

Wondering if anyone has seen something similar to this before.  One of our
tapestry apps throws random OutOfMemoryError exceptions.  Unfortunately, the
trace doesn't point to anything specific in the app.

If someone has any ideas or pointers it would be much appreciated.  I'm not
sure where to start.

I've attached the stack trace.

Thanks in advance,
Eric








RE: random java.lang.OutOfMemoryError exceptions

Posted by "Howard M. Lewis Ship" <hl...@attbi.com>.
My guess would be that you are using the DataSqueezer to encode a
Serializable object.  The object is large.  Somewhere in the flow between
server to client back to server, the value is getting truncated and GZip
input stream is spinning out of control trying to deal with the corrupted
stream.
 
Best option: create a custom DataSqueezer adaptor for whatever type of data
your are trying to encode as a service parameter that can work more
efficiently than the SerializableAdaptor (which serializes, compresses using
GZip, then encodes using a URL-safe BASE64-like encoding).
 
 

--
Howard M. Lewis Ship
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/proposals/tapestry



-----Original Message-----
From: Eric Schneider [mailto:eric@centralparksoftware.com] 
Sent: Thursday, April 03, 2003 4:27 PM
To: tapestry-user@jakarta.apache.org
Subject: random java.lang.OutOfMemoryError exceptions


Hi,
 
Wondering if anyone has seen something similar to this before.  One of our
tapestry apps throws random OutOfMemoryError exceptions.  Unfortunately, the
trace doesn't point to anything specific in the app.
 
If someone has any ideas or pointers it would be much appreciated.  I'm not
sure where to start.
 
I've attached the stack trace.
 
Thanks in advance,
Eric