[ https://issues.apache.org/jira/browse/AXIS2-5233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13204451#comment-13204451 ]
Sagara Gunathunga commented on AXIS2-5233: ------------------------------------------- Can you provide more details to reproduce this issue ? If we know exact conditions that cause to this issue then it's easy to fix. > OutOfMemory after redeploy services > ----------------------------------- > > Key: AXIS2-5233 > URL: https://issues.apache.org/jira/browse/AXIS2-5233 > Project: Axis2 > Issue Type: Bug > Components: kernel > Affects Versions: 1.6.1 > Reporter: Oleh > > We have OutOfMemory error after redeploy services. > PROBLEM: > Class org.apache.axis2.deployment.DeploymentEngine has scheduler. > If (hotdeployment = true) we have startSearch in loadServices method. > But we don't clean old scheduler in startSearch method ! > Old SchedulerTask has old RepositoryListener (old WSInfoList) > Old WSInfoList has all old services ! > The scheduler starts thread as deamon. > The Thread is running..running..... > New deploy -> new Thread > The Thread has old data (WSInfoList) and may be GC don't clear memory (Thread > has link to data) > We have result:OutOfMemory :( > SOLUTION 1 > Fixed class org.apache.axis2.deployment.DeploymentEngine > Method startSearch(RepositoryListener listener) > Old Variant > protected void startSearch(RepositoryListener listener) { > scheduler = new Scheduler(); > scheduler.schedule(new SchedulerTask(listener), new > DeploymentIterator()); > } > Fix Variant > protected void startSearch(RepositoryListener listener) { > if (scheduler != null) { > scheduler.cleanup(); // May be it is very important !!! : ) > } > scheduler = new Scheduler(); > scheduler.schedule(new SchedulerTask(listener), new > DeploymentIterator()); > } > SOLUTION 2 (temp) - Disable Hot Deployment > File axis2.xml > <parameter name="hotdeployment">false</parameter> -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@axis.apache.org For additional commands, e-mail: java-dev-h...@axis.apache.org