It's all about the answers!

Ask a question

RTC 5.0 client API memory leak on tomcat


Corey Grimes (11) | asked May 26 '15, 3:37 p.m.
I am seeing the following messages on my tomcat log when using the RTC 5.0 client API, which eventually leads to a PermGen error after enough hot redeploys:

SEVERE: The web application [/myservice] appears to have started a thread named [Worker-JM] but has failed to stop it. This is very likely to create a memory leak.
May 26, 2015 3:30:12 PM org.apache.catalina.loader.WebappClassLoader clearReferencesThreads
SEVERE: The web application [/myservice] appears to have started a thread named [Worker-0] but has failed to stop it. This is very likely to create a memory leak.

I have simplified my servlet down to the following code and still receive the errors: 

ITeamRepository repo;
public void contextInitialized(ServletContextEvent arg0){
     TeamPlatform.startup();
     repo = TeamPlatform.getTeamRepositoryService().getTeamRepository(config.getRepositoryURI());
     IWorkItemClient c = (IWorkItemClient) repo.getClientLibrary(IWorkItemClient.class);
}
public void contextDestroyed(ServletContextEvent arg0){
TeamPlatform.getTeamRepositoryService().removeTeamRepository(repo);
TeamPlatform.shutdown();
}

Note that I'm not even logging in at this point. If I remove the call to getClientLibrary, the errors disappear. These errors seem to appear no matter what client library I try to load. I have verified my contextDestroyed is being called on redeploy.

Any help would be appreciated.

Thank you.

CG



Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.