My application is leaking memory even when not processing any inputs. Using Eclipse Memory Analyzer, I have attached the histogram of the top "spenders".
histogram.JPG
The histogram seems to indicate the leak is in the framework. I just wonder if anyone else has encountered similar issue.
My application uses Spring 3.1.0.M1 and Spring Integration 2.0.1.RELEASE
Any insights on how to identify the root cause of the leak is appreciated.
For reference, this is my config.xml:
Thanks,Code:<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:si="http://www.springframework.org/schema/integration" xmlns:file="http://www.springframework.org/schema/integration/file" xmlns:task="http://www.springframework.org/schema/task" xmlns:context="http://www.springframework.org/schema/context" xmlns:cache="http://www.springframework.org/schema/cache" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-2.0.xsd http://www.springframework.org/schema/integration/file http://www.springframework.org/schema/integration/file/spring-integration-file-2.0.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.1.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd"> <!-- CHANGE app_test.properties to app_prod.properties for PRODUCTION --> <context:property-placeholder location="file:config/app_test.properties"/> <cache:annotation-driven /> <task:annotation-driven /> <task:executor id="file-pollers" pool-size="1" /> <task:executor id="usr-workers" pool-size="1"/> <task:executor id="sdr-workers" pool-size="1"/> <si:poller id="sdr-poller" fixed-delay="100" max-messages-per-poll="100" task-executor="sdr-workers" default="true"/> <si:poller id="usr-poller" fixed-delay="100" max-messages-per-poll="100" task-executor="usr-workers" default="false"/> <!-- Cache setup is for future enhancements --> <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cache-manager-ref="ehcache" /> <!-- Ehcache library setup --> <bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:config-location="config/ehcache.xml" /> <bean id="log4jInitialization" class="org.springframework.beans.factory.config.MethodInvokingFactoryBean"> <property name="targetClass" value="org.springframework.util.Log4jConfigurer" /> <property name="targetMethod" value="initLogging" /> <property name="arguments"> <list> <value>${log4j.config}</value> <value>10000</value> </list> </property> </bean> <file:inbound-channel-adapter directory="file:${dir.sdr}" auto-create-directory="true" id="sdrFilesIn" filter="customFilter" comparator="customComparator"> <si:poller fixed-delay="1000" max-messages-per-poll="1" task-executor="file-pollers" /> </file:inbound-channel-adapter> <bean id="customComparator" class="com.syniverse.xdr.SdrFileComparator" /> <bean id="customFilter" class="com.syniverse.xdr.SdrFileFilter"> <property name="filePattern" value=".*SDR"></property> <property name="age" value="${file.age}"></property> </bean> <file:outbound-gateway directory="file:${dir.processed}" request-channel="sdrFilesIn" auto-create-directory="true" delete-source-files="true" reply-channel="sdrFile"> </file:outbound-gateway> <si:service-activator input-channel="sdrFile" ref="reader" method="process"> </si:service-activator> <bean id="reader" class="com.syniverse.xdr.SdrReader" init-method="init"> <property name="outChannel" value="line" /> </bean> <si:transformer input-channel="line" output-channel="inSdr" ref="toSdr" method="transform"> </si:transformer> <bean id="toSdr" class="com.syniverse.xdr.LineToSdr" /> <si:recipient-list-router input-channel="inSdr"> <si:recipient channel="sdrChannel"/> <si:recipient channel="usrChannel"/> </si:recipient-list-router> <si:channel id="sdrChannel"> <si:queue capacity="1000"/> </si:channel> <si:channel id="usrChannel"> <si:queue capacity="1000"/> </si:channel> <si:service-activator input-channel="sdrChannel" output-channel="sdrBatch" ref="sdrGather" method="gather"> </si:service-activator> <bean id="sdrGather" class="com.syniverse.xdr.SdrGather"> <property name="batchSize" value="200" /> </bean> <si:channel id="sdrBatch"> <si:queue capacity="1000"/> </si:channel> <si:service-activator input-channel="sdrBatch" ref="DBInsert" method="batchInsert" output-channel="nullChannel"> </si:service-activator> <bean id="DBInsert" class="com.syniverse.xdr.db.JdbcSdrDao" init-method="init"> <property name="dataSource" ref="RMNRPT"/> <property name="acctTable" value="${acct_table.name}"/> <property name="alertTable" value="${alert_table.name}"/> </bean> <si:filter input-channel="usrChannel" output-channel="filteredSdrs" ref="sdrFilter" method="filter"> </si:filter> <bean id="sdrFilter" class="com.syniverse.xdr.SdrFilter"> <property name="operators"> <set> <value>BlueGrass</value> <value>10000_OprA</value> <value>20000_OprB</value> <value>30000_OprC</value> </set> </property> </bean> <si:channel id="filteredSdrs"> <si:queue capacity="2000"/> </si:channel> <si:service-activator input-channel="filteredSdrs" ref="UsrUpdate" method="updateUsage"> <si:poller ref="usr-poller"/> </si:service-activator> <bean id="UsrUpdate" class="com.syniverse.xdr.db.JdbcUsrDao"> <property name="dataSource" ref="RMNRPT"/> <property name="procName" value="${stored_proc.name}"/> </bean> <bean id="RMNRPT" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName" value="${jdbc.driverClassName}" /> <property name="url" value="${jdbc.url}" /> <property name="username" value="${jdbc.username}" /> <property name="password" value="${jdbc.password}" /> <property name="initialSize" value="5" /> </bean> <bean id="sdrReaper" class="com.syniverse.xdr.SdrReaper" init-method="init" /> <import resource="aop_config.xml" /> </beans>
Khoa


Reply With Quote