Guest User

I noticed a memory leak.
Hi, I would like to ask a question regarding a memory leak. While using the service for internal use, I noticed a memory leak at a service that no one has not used. I applied the memory setting at the Log4J, the heap size became 58% when the memory leak occurred. Also noticed a message of " Disconnection is detected while read/write " in JENNIFER without any particular logs. Before I noticed the leak, I only ran the simple query. (count query.) What should I do to fix the problem?

1. Tomcat
– version : Tomcat 7
– Environment
> server.xml

> catalina.sh JAVA_OPTS="-Djava.awt.headless=true -server -Xms1024m -Xmx2048m -XX:NewSize=512m -XX:MaxNewSize=512m -XX:MaxPermSize=512m -XX:+DisableExplicitGC -javaagent:/usr/local/src/agent.java/jennifer.jar -Djennifer.config=/usr/local/src/agent.java/conf/w13.conf "

2. DBMS : MSSQL 2012

3. Server Spec
CPU : 2Core ( Cloud )
– Memory : 4GB

==================
2015-06-30 13:24:44,314 INFO [ajp-bio-8009-exec-17] interceptor.CPInterceptor (CPInterceptor.java:126) – ————————————————————- Check Memory -————————————————-
2015-06-30 13:24:44,314 INFO [ajp-bio-8009-exec-17] interceptor.CPInterceptor (CPInterceptor.java:127) – | TOTAL MEMORY : 1070596096
2015-06-30 13:24:44,315 INFO [ajp-bio-8009-exec-17] interceptor.CPInterceptor (CPInterceptor.java:128) – | FREE SIZE : 440819808
2015-06-30 13:24:44,315 INFO [ajp-bio-8009-exec-17] interceptor.CPInterceptor (CPInterceptor.java:133) – | HEAP SIZE : 629874160 (58%)
2015-06-30 13:24:44,315 INFO [ajp-bio-8009-exec-17] interceptor.CPInterceptor (CPInterceptor.java:134) – ———————————————————————————————————————————————————-

Jun 30, 2015 1:28:50 PM org.apache.coyote.AbstractProtocol pause

INFO: Pausing ProtocolHandler [“http-bio-8080”]
Jun 30, 2015 1:28:50 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler [“http-bio-8443”]
Jun 30, 2015 1:28:50 PM org.apache.coyote.AbstractProtocol pause
INFO: Pausing ProtocolHandler [“ajp-bio-8009”]
Jun 30, 2015 1:28:50 PM org.apache.catalina.core.StandardService stopInternal
INFO: Stopping service Catalina
2015-06-30 13:28:50,135 INFO [localhost-startStop-2] listener.CBContextLoaderListener (CBContextLoaderListener.java:28) – CBContextLoaderListener contextDestroyed
Jun 30, 2015 1:28:50 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/api] registered the JDBC driver [com.microsoft.sqlserver.jdbc.SQLServerDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Jun 30, 2015 1:28:50 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/api] registered the JDBC driver [net.sf.log4jdbc.DriverSpy] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Jun 30, 2015 1:28:50 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
SEVERE: The web application [/api] registered the JDBC driver [org.hsqldb.jdbcDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
Jun 30, 2015 1:28:50 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/api] created a ThreadLocal with key of type [net.sf.json.AbstractJSON.CycleSet] (value [net.sf.json.AbstractJSON$CycleSet@5075eb16]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@6d9d1a9e]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jun 30, 2015 1:28:50 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/api] created a ThreadLocal with key of type [com.microsoft.sqlserver.jdbc.ActivityCorrelator$1] (value [com.microsoft.sqlserver.jdbc.ActivityCorrelator$1@11d2d686]) and a value of type [com.microsoft.sqlserver.jdbc.ActivityId] (value [99145651-302c-4300-8f7f-1f853b8a1a67-34]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
Jun 30, 2015 1:28:50 PM org.apache.catalina.loader.WebappClassLoader checkThreadLocalMapForLeaks
SEVERE: The web application [/api] created a ThreadLocal with key of type [net.sf.json.AbstractJSON.CycleSet] (value [net.sf.json.AbstractJSON$CycleSet@5075eb16]) and a value of type [java.lang.ref.SoftReference] (value [java.lang.ref.SoftReference@6b1b93fa]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.

Khalid Saeed

The message implies that the leak did not occur. Instead, an object that appears when the tomcat terminates has not been removed. For this reason, the message gives you an alert of possible leakage.