phoenix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lichenglin (JIRA)" <>
Subject [jira] [Created] (PHOENIX-2860) The phoenix driver may cause memory leak when redeploy By tomcat
Date Wed, 27 Apr 2016 08:04:12 GMT
lichenglin created PHOENIX-2860:

             Summary: The phoenix driver may cause memory leak when redeploy By tomcat
                 Key: PHOENIX-2860
             Project: Phoenix
          Issue Type: Bug
    Affects Versions: 4.6.0
         Environment: tomcat7
            Reporter: lichenglin

I'm using  org.apache.commons.dbcp.BasicDataSource to query the server.
here is my code in spring.xml

  	<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
		<property name="driverClassName" value="org.apache.phoenix.jdbc.PhoenixDriver" />
		<property name="url" value="jdbc:phoenix:master" />
		<property name="username" value="" />
		<property name="password" value="" />

But when I used jenkins to redeploy the war ,I got this message in the tomcat's log 

27-Apr-2016 15:55:21.579 WARNING [http-nio-9080-exec-36] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads
The web application [console] appears to have started a thread named [Timer for 'phoenix'
metrics system] but has failed to stop it. This is very likely to create a memory leak. Stack
trace of thread:
 java.lang.Object.wait(Native Method)

I'm trying to close the driver when the servlet shutdown with the code 
	@EventListener({ ContextStoppedEvent.class, ContextClosedEvent.class })
	public void handleContextStart(ApplicationContextEvent e)
			throws SchedulerException, InterruptedException, SQLException, IOException {
		if (deploy) {
It doesn't work!!

This message was sent by Atlassian JIRA

View raw message