On Mon, Sep 26, 2011 at 2:44 PM, Alex Milowski <ale...@milowski.org> wrote: > I was tracking down an out-of-memory error with my new Atomojo V2 > server project where I moved to 2.1.m7 and I found the solution quite > disturbing. I have a configuration where I call out to Google's > ClientLogin and the code that did that had this code: > > Client client = new > Client(context.createChildContext(),service.getSchemeProtocol()); >
I am unable to reproduce this problem outside of my large server application (Atomojo V2). In my simple test case, I keep seeing log entries like: "Stopping the HTTP Client". which I do not see in my Atomojo V2 server log. I suspect that the client isn't being garbage collected. Should developers allways call "stop()" on a client they instantiated when they are done? I did this in my test case and I see the memory consumption much more stable. I changed the code to use the Client returned by getClientDispatcher() but I'd like to understand how instantiated clients should be handled. I still have a problem with the Client instance returned by getContext().getClientDispatcher(). After a large number of request, it eventually fails with a status code of 1001. That usually has meant some kind of exception deep in the code but I haven't been able to track that down. I am hoping to reproduce this in a much smaller test case. --Alex Milowski ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2846554