Tuesday, June 14, 2011

RequestFactory causing OutOfMemoryError

Hi!

We've recently been trying to switch from GWT-RPC to RequestFactory
and we've been generally successful. However, we've noticed that after
quite a large number of requests (depending on the volume of data
sent) the server was running out of memory. I set up a test project to
investigate and came up with this simple class:

public class SampleMessage {
private String message;
private List<Long> numbers;

// getters and setters cut for brevity
}

and a client-side ValueProxy for it. Regardless of the size of the
data sent per request (controlled by the number of Longs in the
list), we were still running out of memory, both in development mode
and with compiled code deployed on a server. Later I've come across
this issue: http://code.google.com/p/google-web-toolkit/issues/detail?id=6193
; thinking it might be related, I checked out the GWT trunk, built the
jars and used those, but that didn't help.

I took a long and careful look at the heap and after some analysis I
noticed that the Longs I've been sending don't get garbage-collected
(also true for other types stored in lists, which I checked later).
The same goes for all serialized properties (the 'message' String and
Longs). The questions at this point is: is this some kind of caching
feature that backfires on us? Or is it possible that we messed up
configuration at some point? Or perhaps this is a new bug?

Thanks in advance for all replies,
Filip Krygowski

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate