Announcement Announcement Module
Collapse
No announcement yet.
Out of memory issue with HTTPComponents (HTTPClient) 4.1.3 and Spring 3.1.1 and SSL. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Out of memory issue with HTTPComponents (HTTPClient) 4.1.3 and Spring 3.1.1 and SSL.

    Hi -

    We are using Apache HTTP Components v 4.1.3 with Spring 3.1.1. We are accessing a remote service over HTTPs with a valid certificate (server-side certificate only). This is headless (integration server only) application is running in jboss 4.2.3 on RHEL with 1.5.0_19-b02 . After a period of poor connectivity to the server, we see a memory outage. When loading the heap dump into Eclipse Memory analyzer, I see the following in the leak suspects report:

    7,291 instances of "com.sun.net.ssl.internal.ssl.SSLSocketImpl", loaded by "<system class loader>" occupy 282,993,552 (58.09%) bytes.

    Keywords
    com.sun.net.ssl.internal.ssl.SSLSocketImpl


    It appears that a very long chain of class java.lang.ref.Finalizer objects has references to the SSLSocketImpl instances.
    1) Has anyone seen this before
    2) Is this related to the fact that we are using HTTP Components 4.1.3 with ThreadSafeClientConnManager (This has been replaced with PoolingClientConnectionManager in v4.2)
    3) Is this related to any of the following properties not being set? If we had configured any of these, would it make a difference?
    -javax.net.ssl.sessionCacheSize
    -javax.net.ssl.sessionCacheTimeout
    -javax.net.ssl.sessionTimeout




    Here are the system properties according to the heap dump:

    Key Value
    EA.property.file /opt/sbtransSonic2/EA_conf/EA_DP_AMER4.properties
    PROPERTIES_FILE tsmx.properties
    TSMX_VERSION unknown
    catalina.base /opt/sbtransSonic2/jboss-4.2.3.GA/server/incontroldp-amer4-server
    catalina.ext.dirs /opt/sbtransSonic2/jboss-4.2.3.GA/server/incontroldp-amer4-server/lib
    catalina.home /opt/sbtransSonic2/jboss-4.2.3.GA/server/incontroldp-amer4-server
    catalina.useNaming FALSE
    com.arjuna.ats.arjuna.objectstore.objectStoreDir /opt/sbtransSonic2/jboss-4.2.3.GA/server/incontroldp-amer4-server/data/tx-object-store
    com.arjuna.ats.jta.lastResourceOptimisationInterfa ce org.jboss.tm.LastResource
    com.arjuna.ats.tsmx.agentimpl com.arjuna.ats.internal.jbossatx.agent.LocalJBossA gentImpl
    com.arjuna.common.util.logger log4j_releveler
    com.arjuna.common.util.logging.DebugLevel 0x00000000
    com.arjuna.common.util.logging.FacilityLevel 0xffffffff
    com.arjuna.common.util.logging.VisibilityLevel 0xffffffff
    common.loader ${catalina.home}/lib,${catalina.home}/lib/*.jar
    file.encoding UTF-8
    file.encoding.pkg sun.io
    file.separator /
    hibernate.bytecode.provider javassist
    java.awt.graphicsenv sun.awt.X11GraphicsEnvironment
    java.awt.printerjob sun.print.PSPrinterJob
    java.class.path /opt/sbtransSonic2/jboss-4.2.3.GA/bin/run.jar:/opt/java5/lib/tools.jar
    java.class.version 49
    java.endorsed.dirs /opt/sbtransSonic2/jboss-4.2.3.GA/lib/endorsed
    java.ext.dirs /usr/java/jdk1.5.0_19/jre/lib/ext
    java.home /usr/java/jdk1.5.0_19/jre
    java.io.tmpdir /tmp
    java.library.path /usr/java/jdk1.5.0_19/jre/lib/i386/server:/usr/java/jdk1.5.0_19/jre/lib/i386:/usr/java/jdk1.5.0_19/jre/../lib/i386
    java.naming.factory.initial org.jnp.interfaces.NamingContextFactory
    java.naming.factory.url.pkgs org.jboss.naming:org.jnp.interfaces
    java.net.preferIPv4Stack TRUE
    java.protocol.handler.pkgs org.jboss.net.protocol
    java.rmi.server.RMIClassLoaderSpi org.jboss.system.JBossRMIClassLoader
    java.rmi.server.codebase http://127.0.0.1:14525/
    java.rmi.server.hostname 127.0.0.1
    java.runtime.name Java(TM) 2 Runtime Environment, Standard Edition
    java.runtime.version 1.5.0_19-b02
    java.specification.name Java Platform API Specification
    java.specification.vendor Sun Microsystems Inc.
    java.specification.version 1.5
    java.vendor Sun Microsystems Inc.
    java.vendor.url http://java.sun.com/
    java.vendor.url.bug http://java.sun.com/cgi-bin/bugreport.cgi
    java.version 1.5.0_19
    java.vm.info mixed mode
    java.vm.name Java HotSpot(TM) Server VM
    java.vm.specification.name Java Virtual Machine Specification
    java.vm.specification.vendor Sun Microsystems Inc.
    java.vm.specification.version 1
    java.vm.vendor Sun Microsystems Inc.
    java.vm.version 1.5.0_19-b02
    javax.management.builder.initial org.jboss.mx.server.MBeanServerBuilderImpl
    jboss.bind.address 127.0.0.1
    jboss.home.dir /opt/sbtransSonic2/jboss-4.2.3.GA
    jboss.home.url file:/opt/sbtransSonic2/jboss-4.2.3.GA/
    jboss.identity ca878b62a947745cx647c94e8x139c2c140e2x-8000312
    jboss.lib.url file:/opt/sbtransSonic2/jboss-4.2.3.GA/lib/
    jboss.remoting.domain JBOSS
    jboss.remoting.instanceid ca878b62a947745cx647c94e8x139c2c140e2x-8000312
    jboss.remoting.jmxid sb2001_1351831664777
    jboss.remoting.version 22
    jboss.server.base.dir /opt/sbtransSonic2/jboss-4.2.3.GA/server
    jboss.server.base.url file:/opt/sbtransSonic2/jboss-4.2.3.GA/server/
    jboss.server.config.url file:/opt/sbtransSonic2/jboss-4.2.3.GA/server/incontroldp-amer4-server/conf/
    jboss.server.data.dir /opt/sbtransSonic2/jboss-4.2.3.GA/server/incontroldp-amer4-server/data
    jboss.server.home.dir /opt/sbtransSonic2/jboss-4.2.3.GA/server/incontroldp-amer4-server
    jboss.server.home.url file:/opt/sbtransSonic2/jboss-4.2.3.GA/server/incontroldp-amer4-server/
    jboss.server.lib.url file:/opt/sbtransSonic2/jboss-4.2.3.GA/server/incontroldp-amer4-server/lib/
    jboss.server.log.dir /opt/sbtransSonic2/jboss-4.2.3.GA/server/incontroldp-amer4-server/log
    jboss.server.name incontroldp-amer4-server
    jboss.server.temp.dir /opt/sbtransSonic2/jboss-4.2.3.GA/server/incontroldp-amer4-server/tmp
    jbossmx.loader.repository.class org.jboss.mx.loading.UnifiedLoaderRepository3
    jgroups.bind_addr 127.0.0.1
    line.separator \u000a
    org.apache.commons.logging.Log org.apache.commons.logging.impl.Log4JLogger
    org.w3c.dom.DOMImplementationSourceList org.apache.xerces.dom.DOMXSImplementationSourceImp l
    os.arch i386
    os.name Linux
    os.version 2.6.9-55.ELsmp
    package.access sun.,org.apache.catalina.,org.apache.coyote.,org.a pache.tomcat.,org.apache.jasper.,sun.beans.
    package.definition sun.,java.,org.apache.catalina.,org.apache.coyote. ,org.apache.tomcat.,org.apache.jasper.
    path.separator :
    program.name run.sh
    server.loader
    shared.loader
    sun.arch.data.model 32
    sun.boot.class.path /opt/sbtransSonic2/jboss-4.2.3.GA/lib/endorsed/serializer.jar:/opt/sbtransSonic2/jboss-4.2.3.GA/lib/endorsed/xalan.jar:/opt/sbtransSonic2/jboss-4.2.3.GA/lib/endorsed/xercesImpl.jar:/usr/java/jdk1.5.0_19/jre/lib/rt.jar:/usr/java/jdk1.5.0_19/jre/lib/i18n.jar:/usr/java/jdk1.5.0_19/jre/lib/sunrsasign.jar:/usr/java/jdk1.5.0_19/jre/lib/jsse.jar:/usr/java/jdk1.5.0_19/jre/lib/jce.jar:/usr/java/jdk1.5.0_19/jre/lib/charsets.jar:/usr/java/jdk1.5.0_19/jre/classes
    sun.boot.library.path /usr/java/jdk1.5.0_19/jre/lib/i386
    sun.cpu.endian little
    sun.cpu.isalist
    sun.io.unicode.encoding UnicodeLittle
    sun.java.launcher SUN_STANDARD
    sun.jnu.encoding UTF-8
    sun.management.compiler HotSpot Server Compiler
    sun.os.patch.level unknown
    sun.rmi.dgc.client.gcInterval 3600000
    sun.rmi.dgc.server.gcInterval 3600000
    tomcat.util.buf.StringCache.byte.enabled TRUE
    user.country US
    user.dir /opt/sbtransSonic2/jboss-4.2.3.GA/bin
    user.home /export/home/sbadmin
    user.language en
    user.name sbadmin
    user.timezone GMT


    Attached is our spring config file (renamed to .txt file):
Working...
X