Memory Leak w/ WebLogic 5.1

I've created a simple servlet to EJB skeleton and built a stress testing
          tool to make sequential requests to the servlet which in turn creates an
          instance of a stateless session been. Both the servlet and bean do not have
          any real logic in them, just some minimal timing output.
          When run for a few million iterations, the WebLogic JVM slowly leaks memory
          that cannot be reclaimed even with force garbage collection from the
          WebLogic console. Below are 3 snippets of code showing the servlet, the EJB
          call, and the simple client test.
          If anyone else is ecperiencing similar problems or can see a flaw, I'd be
          most grateful.
          Andy
          Servlet code
          protected void doGet(HttpServletRequest req, HttpServletResponse res)
          throws ServletException, IOException
          TestBean bean;
          long requestStartTime = System.currentTimeMillis();
          res.setContentType("text/html");
          PrintWriter out = res.getWriter();
          out.println("<html><head><title>Hello World!</title></head>");
          out.println("<body><h1>Hello World!</h1></body></html>");
          try {
          bean = home.create();;
          bean.testMethod();
          catch (Exception e) {
          totalTime += (System.currentTimeMillis() - requestStartTime);
          Bean code
          public class TestBean implements SessionBean {
          private SessionContext ctx;
          public void ejbActivate() {
          public void ejbPassivate() {
          public void ejbCreate() {
          public void ejbRemove() {
          public void setSessionContext(SessionContext ctx) {
          this.ctx = ctx;
          public void testMethod() {
          Client code
          public void simulateLoad()
          throws IOException
          long totalRequestTime = 0, requestTime, requestStartTime;
          long totalResponseTime = 0, responseTime, responseStartTime;
          try {
          log("Opening connection to "+ url + (debug ? "?debug=true" : ""));
          for (int i = 1; i <= numRequests; i++) {
          HTTPConnection con = new HTTPConnection("localhost",7001);
          HTTPResponse rsp;
          byte data[];
          if ((i % 10000) == 0) {
          log("\nGET Request "+i+" to "+ url + (debug ? "?debug=true" :
          requestStartTime = System.currentTimeMillis();
          rsp = con.Get("/mcumanager" + (debug ? "?debug=true" : ""));
          requestTime = System.currentTimeMillis() - requestStartTime;
          responseStartTime = System.currentTimeMillis();
          if (rsp.getStatusCode() >= 300) {
          log("Received Error: "+rsp.getReasonLine());
          log(new String(rsp.getData()));
          else
          data = rsp.getData();
          responseTime = System.currentTimeMillis() - responseStartTime;
          totalRequestTime += requestTime;
          totalResponseTime += responseTime;
          if ((i % 10000) == 0) {
          log("GET Response "+i+": "+rsp);
          if ((i % 100) == 0) {
          log ("Avg request time :
          "+((float)totalRequestTime/(float)i)+"ms");
          log ("Avg response time :
          "+((float)totalResponseTime/(float)i)+"ms");
          catch (IOException ioe) {
          log(ioe.toString());
          ioe.printStackTrace();
          catch (ModuleException me) {
          log("Error handling request: " + me.getMessage());
          me.printStackTrace();
          

Please read discussion "WLS dies during stress testing" & "performance
          degradation PROBLEM" in interest.performance.
          Hope it helps.
          Cheers - Wei
          Andy Riedel <[email protected]> wrote in message
          news:[email protected]...
          > I have additional information on this problem. I have replicated the exact
          > same memory leak issue using the included HelloWorldServlet. I use Jrun's
          > ServletKiller stress tool running 16 simultaneous request threads
          requesting
          > the HelloWorldServlet. This WebLogic 5.1 server will leak memory and
          > eventually run out of memory all together with an OutOfMemoryException
          after
          > about 6-8 hours. This indicates that the bug is in the base HTTP Servlet
          > engine code.
          >
          > I have tried turning off the http log (i.e. access.log) as well as
          > notification events from the servlet engine and it still leaks memory.
          >
          > Andy
          >
          >
          >
          > Andy Riedel Chief Architect HearMe Call me through VoiceCONTACTtm -- right
          > from your computer. Online Status:
          > "Andy Riedel" <[email protected]> wrote in message
          > news:[email protected]...
          > > I've created a simple servlet to EJB skeleton and built a stress testing
          > > tool to make sequential requests to the servlet which in turn creates an
          > > instance of a stateless session been. Both the servlet and bean do not
          > have
          > > any real logic in them, just some minimal timing output.
          > >
          > > When run for a few million iterations, the WebLogic JVM slowly leaks
          > memory
          > > that cannot be reclaimed even with force garbage collection from the
          > > WebLogic console. Below are 3 snippets of code showing the servlet, the
          > EJB
          > > call, and the simple client test.
          > >
          > > If anyone else is ecperiencing similar problems or can see a flaw, I'd
          be
          > > most grateful.
          > >
          > > Andy
          > >
          > >
          > > Servlet code
          > > -------------
          > >
          > > protected void doGet(HttpServletRequest req, HttpServletResponse res)
          > > throws ServletException, IOException
          > > {
          > > TestBean bean;
          > >
          > > long requestStartTime = System.currentTimeMillis();
          > >
          > > res.setContentType("text/html");
          > > PrintWriter out = res.getWriter();
          > > out.println("<html><head><title>Hello World!</title></head>");
          > > out.println("<body><h1>Hello World!</h1></body></html>");
          > >
          > > try {
          > > bean = home.create();;
          > > bean.testMethod();
          > > }
          > > catch (Exception e) {
          > > }
          > >
          > > totalTime += (System.currentTimeMillis() - requestStartTime);
          > > }
          > >
          > > Bean code
          > > -----------
          > > public class TestBean implements SessionBean {
          > >
          > > private SessionContext ctx;
          > >
          > > public void ejbActivate() {
          > > }
          > >
          > > public void ejbPassivate() {
          > > }
          > >
          > > public void ejbCreate() {
          > > }
          > >
          > > public void ejbRemove() {
          > > }
          > >
          > > public void setSessionContext(SessionContext ctx) {
          > > this.ctx = ctx;
          > > }
          > >
          > > public void testMethod() {
          > > }
          > > }
          > >
          > > Client code
          > > ------------
          > > public void simulateLoad()
          > > throws IOException
          > > {
          > > long totalRequestTime = 0, requestTime, requestStartTime;
          > > long totalResponseTime = 0, responseTime, responseStartTime;
          > >
          > > try {
          > > log("Opening connection to "+ url + (debug ? "?debug=true" : ""));
          > >
          > > for (int i = 1; i <= numRequests; i++) {
          > >
          > > HTTPConnection con = new HTTPConnection("localhost",7001);
          > > HTTPResponse rsp;
          > > byte data[];
          > >
          > > if ((i % 10000) == 0) {
          > > log("\nGET Request "+i+" to "+ url + (debug ? "?debug=true" :
          > > ""));
          > > }
          > >
          > > requestStartTime = System.currentTimeMillis();
          > >
          > > rsp = con.Get("/mcumanager" + (debug ? "?debug=true" : ""));
          > >
          > > requestTime = System.currentTimeMillis() - requestStartTime;
          > >
          > > responseStartTime = System.currentTimeMillis();
          > >
          > > if (rsp.getStatusCode() >= 300) {
          > > log("Received Error: "+rsp.getReasonLine());
          > > log(new String(rsp.getData()));
          > > }
          > > else
          > > data = rsp.getData();
          > >
          > > responseTime = System.currentTimeMillis() - responseStartTime;
          > >
          > > totalRequestTime += requestTime;
          > > totalResponseTime += responseTime;
          > >
          > > if ((i % 10000) == 0) {
          > > log("GET Response "+i+": "+rsp);
          > > }
          > >
          > > if ((i % 100) == 0) {
          > > log ("Avg request time :
          > > "+((float)totalRequestTime/(float)i)+"ms");
          > > log ("Avg response time :
          > > "+((float)totalResponseTime/(float)i)+"ms");
          > > }
          > > }
          > > }
          > > catch (IOException ioe) {
          > > log(ioe.toString());
          > > ioe.printStackTrace();
          > > }
          > > catch (ModuleException me) {
          > > log("Error handling request: " + me.getMessage());
          > > me.printStackTrace();
          > > }
          > > }
          > >
          > >
          > >
          > >
          > >
          >
          >
          

Similar Messages

  • Memory leak in weblogic 6.0 sp2 oracle 8.1.7 thin driver

    Hi,
         I have a simple client that opens a database connection, selects from
    a table containing five rows of data (with four columns in each row)
    and then closes all connections. On running this in a loop, I get the
    following error after some time:
    <Nov 28, 2001 5:57:40 PM GMT+06:00> <Error> <Adapter>
    <OutOfMemoryError in
    Adapter
    java.lang.OutOfMemoryError
    <<no stack trace available>>
    >
    <Nov 28, 2001 5:57:40 PM GMT+06:00> <Error> <Kernel> <ExecuteRequest
    failed
    java.lang.OutOfMemoryError
    I am running with a heap size of 64 Mb. The java command that runs
    the client is:
    java -ms64m -mx64m -cp .:/opt/bea/wlserver6.0/lib/weblogic.jar
    -Djava.naming.f
    actory.initial=weblogic.jndi.WLInitialContextFactory
    -Djava.naming.provider.url=
    t3://garlic:7001 -verbose:gc Test
    The following is the client code that opens the db connection and does
    the select:
    import java.util.*;
    import java.sql.*;
    import javax.naming.*;
    import javax.sql.*;
    public class Test {
    private static final String strQuery = "SELECT * from tblPromotion";
    public static void main(String argv[])
    throws Exception
    String ctxFactory     = System.getProperty
    ("java.naming.factory.initial");
    String providerUrl     = System.getProperty
    ("java.naming.provider.url");
    Properties jndiEnv          = System.getProperties ();
    System.out.println ("ctxFactory : " + ctxFactory);
    System.out.println ("ProviderURL : " + providerUrl);
    Context ctx     = new InitialContext (jndiEnv);
    for (int i=0; i <1000000; i++)
    System.out.println("Running query for the "+i+" time");
    Connection con = null;
    Statement stmnt = null;
    ResultSet rs     = null;
    try
    DataSource ds     = (DataSource) ctx.lookup
    (System.getProperty("eaMDataStore", "jdbc/eaMarket"));
    con = ds.getConnection ();
    stmnt = con.createStatement();
    rs = stmnt.executeQuery(strQuery);
    while (rs.next ())
    //System.out.print(".");
    //System.out.println(".");
    ds = null;
    catch (java.sql.SQLException sqle)
    System.out.println("SQL Exception : "+sqle.getMessage());
    finally
    try {
    rs.close ();
    rs = null;
    //System.out.println("closed result set");
    } catch (Exception e) {
    System.out.println("Exception closing result set");
    try {
    stmnt.close ();
    stmnt = null;
    //System.out.println("closed statement");
    } catch (Exception e) {
    System.out.println("Exception closing result set");
    try {
    con.close();
    con = null;
    //System.out.println("closed connection");
    } catch (Exception e) {
    System.out.println("Exception closing connection");
    I am using the Oracle 8.1.7 thin driver. Please let me know if this
    memory leak is a known issue or if its something I am doing.
    thanks,
    rudy

    Repost in JDBC section ... very serious issue but it may be due to Oracle or
    to WL ... does it happen if you test inside WL itself?
    How many iterations does it take to blow? How long? Does changing to a
    different driver (maybe Cloudscape) have the same result?
    Peace,
    Cameron Purdy
    Tangosol Inc.
    << Tangosol Server: How Weblogic applications are customized >>
    << Download now from http://www.tangosol.com/download.jsp >>
    "R.C." <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I have a simple client that opens a database connection, selects from
    a table containing five rows of data (with four columns in each row)
    and then closes all connections. On running this in a loop, I get the
    following error after some time:
    <Nov 28, 2001 5:57:40 PM GMT+06:00> <Error> <Adapter>
    <OutOfMemoryError in
    Adapter
    java.lang.OutOfMemoryError
    <<no stack trace available>>
    >
    <Nov 28, 2001 5:57:40 PM GMT+06:00> <Error> <Kernel> <ExecuteRequest
    failed
    java.lang.OutOfMemoryError
    I am running with a heap size of 64 Mb. The java command that runs
    the client is:
    java -ms64m -mx64m -cp .:/opt/bea/wlserver6.0/lib/weblogic.jar
    -Djava.naming.f
    actory.initial=weblogic.jndi.WLInitialContextFactory
    -Djava.naming.provider.url=
    t3://garlic:7001 -verbose:gc Test
    The following is the client code that opens the db connection and does
    the select:
    import java.util.*;
    import java.sql.*;
    import javax.naming.*;
    import javax.sql.*;
    public class Test {
    private static final String strQuery = "SELECT * from tblPromotion";
    public static void main(String argv[])
    throws Exception
    String ctxFactory = System.getProperty
    ("java.naming.factory.initial");
    String providerUrl = System.getProperty
    ("java.naming.provider.url");
    Properties jndiEnv = System.getProperties ();
    System.out.println ("ctxFactory : " + ctxFactory);
    System.out.println ("ProviderURL : " + providerUrl);
    Context ctx = new InitialContext (jndiEnv);
    for (int i=0; i <1000000; i++)
    System.out.println("Running query for the "+i+" time");
    Connection con = null;
    Statement stmnt = null;
    ResultSet rs = null;
    try
    DataSource ds = (DataSource) ctx.lookup
    (System.getProperty("eaMDataStore", "jdbc/eaMarket"));
    con = ds.getConnection ();
    stmnt = con.createStatement();
    rs = stmnt.executeQuery(strQuery);
    while (rs.next ())
    //System.out.print(".");
    //System.out.println(".");
    ds = null;
    catch (java.sql.SQLException sqle)
    System.out.println("SQL Exception : "+sqle.getMessage());
    finally
    try {
    rs.close ();
    rs = null;
    //System.out.println("closed result set");
    } catch (Exception e) {
    System.out.println("Exception closing result set");
    try {
    stmnt.close ();
    stmnt = null;
    //System.out.println("closed statement");
    } catch (Exception e) {
    System.out.println("Exception closing result set");
    try {
    con.close();
    con = null;
    //System.out.println("closed connection");
    } catch (Exception e) {
    System.out.println("Exception closing connection");
    I am using the Oracle 8.1.7 thin driver. Please let me know if this
    memory leak is a known issue or if its something I am doing.
    thanks,
    rudy

  • Memory Leak with Weblogic 6.1

    Hello everyone.
    I need some help with a problem we are having with our application. It consists on Servlets, JMS with MDBs, Xml parsing...
    Our application dequeues messages from an Oracle Queue and sends xml-text message to a servlet. It also receives xml-text and enqueues objects in an Oracle Queue.
    And it also has access to Oracle Database (context tables, etc).
    We are doing everything on Tru64 Unix (and our tests on Win 2000) and we are using WebLogic 6.1.
    Our problem is that we have found that it seems that the garbage collector is not running well. I mean, with the time our system is degrading. The memory use increases. It seems to be a memory leak.
    We have used a testing tool, OptimizeIt, and we have found that there are
    objects that are increasing the use of memory. If we use the option 'java -verbose' we find that it seems to be Hash objects (HashMap, Hashtable) which are increasing the use of memory. In our code we are not using any hashtable nor any class that extends from it (we have deleted everyone).
    Can it be due to a problem with WebLogic? A problem with JMS, queues, etc? A problem with JNDI?
    Could anybody please help us?
    Thanks in advanced.

    Yes, we see that there are some entries of the type:
    java/util/Hahstable$Entry
    java/util/Hahstable
    weblogic/jndi/Environment
    This entries keep growing and growing with the time.
    We have deleted all the Hashtable, Properties and all the kind of Collection objects. I guess WebLogic is using this objects in order to arrange our application runs.
    Am I right? Do you know if we can do anything?
    Thank you.

  • ThreadLocalObject memory leak detected (Weblogic 8 SP6)

    It seems that our application server (which heavily uses Entity and Stateless session beans) constantly creates weblogic.ejb20.internal.BaseEJBObject,ThreadLocalObject's in memory. These objects keep increasing and never go down.
    In a typical 90 hr run we create upto 22,000,000 instances of these objects. Could someone explain what these are used for and how to fix this issue.

    Before you assume you have a memory leak, go to the "Monitoring"->"Performance" page of your server config. Set the page to auto-refresh (I think you can do that in 8.1). While your application is doing its work continuously, every 30 seconds or so, push the "garbage collect" button and watch the "percent free" amount immediately after the GC completes. Keep track of that number. If that number (the one after the GC completes) is continuously going down, and eventually causes an OutOfMemory error, then you have a memory leak. If not, then you probably don't.

  • Possible memory leak in Weblogic 7.0

    We have developed an EJB application on Weblogic 7.0 running on HP-UX 11.0. Some
    JSP/Javabean programs, that lookup EJB compoments for services, are developed
    on the Resin web server to serve browser requests. Both Resin and Weblogic are
    running on the same HP machine. JDK version is 1.3.1_06 for HP-UX.
    The real memory is 2GB. Tha parameters to start Resin server are
    -showversion -verbose:gc -Xms384m -Xmx384m -Xoptimize
    The parameters to startup Weblogic are in the following:
    -server -showversion -verbose:gc -Xms768m -Xmx768m -XX:NewSize=256m -XX:SurvivorRatio=6
    -Xoptimize -XdoCloseWithReadPending
    In our observations, the peak traffic is during the working hours. Only few users
    (less than 40 users) stay in our system in the night and holidays.
    And in our observations, the weblogic will do the GC if necessary. But some memory
    are lost after each GC even not in the peak time. Thus, after running two or three
    days, there are only lillte free memory for use, and the Weblogic begins to take
    much time (10-30 seconds ) doing GC more often and often. At last, an OutOfMemory
    error generated.
    I hope that Weglogic can serve all the time.
    Does anybody han as experience on this problem?

    Thanks for your kinfness.
    We have wrote some single-user applications to test the Weblogic 7.0. We doubt
    it is JDBC driver's problem.
    We downloaded the Informix JDBC driver 2.21_JC2 to replace the older version 2.20_JC1
    and retest our applications. The memory usage curve looks much better and the
    applications run over three days.
    We will continue to observe the execution. Maybe the JDBC driver is the real problem.
    "Aravind Krishnasamy" <[email protected]> wrote:
    I am not sure whether it's an application problem or application server
    problem. Both are possible. I am not familar with HP Java Version.
    It may be a problem due to loitering object. You can try doing testing
    with
    single user and the memory needs for the user.
    NoteThe memory level before the test and after the test
    Foce GC and you need to GC same level of HEAP Used, Profiling tools will
    be
    helpful to find application problem
    Aravind
    "Wen-Hung Yeh" <[email protected]> wrote in message
    news:[email protected]...
    We have developed an EJB application on Weblogic 7.0 running on HP-UX11.0. Some
    JSP/Javabean programs, that lookup EJB compoments for services, aredeveloped
    on the Resin web server to serve browser requests. Both Resin and Weblogicare
    running on the same HP machine. JDK version is 1.3.1_06 for HP-UX.
    The real memory is 2GB. Tha parameters to start Resin server are
    -showversion -verbose:gc -Xms384m -Xmx384m -Xoptimize
    The parameters to startup Weblogic are in the following:
    -server -showversion -verbose:gc -Xms768m -Xmx768m -XX:NewSize=256m-XX:Su
    rvivorRatio=6
    -Xoptimize -XdoCloseWithReadPending
    In our observations, the peak traffic is during the working hours.Only
    few users
    (less than 40 users) stay in our system in the night and holidays.
    And in our observations, the weblogic will do the GC if necessary.But
    some memory
    are lost after each GC even not in the peak time. Thus, after runningtwo
    or three
    days, there are only lillte free memory for use, and the Weblogic beginsto take
    much time (10-30 seconds ) doing GC more often and often. At last,an
    OutOfMemory
    error generated.
    I hope that Weglogic can serve all the time.
    Does anybody han as experience on this problem?

  • Memory leak in weblogic server 5.1 sp 9?

    We have been getting an out of memory error at production sites after
    several days of running. We changed the starup file to include the
    verbose:gc parameter and we are running jdk1.3.1_02. Over time the full
    garbage collection message shows that the heap size after garbage collection
    is growing until the server runs out of memory. Can anyone tell me the best
    way to identify the problem?
    Thanks,
    Derek

    had the same problem on 1.2 and sp 9. upgraded to 1.3_02 and sp11 and the
    problem was solved....
    "Derek Gibbs" <[email protected]> wrote in message
    news:[email protected]..
    We have been getting an out of memory error at production sites after
    several days of running. We changed the starup file to include the
    verbose:gc parameter and we are running jdk1.3.1_02. Over time the full
    garbage collection message shows that the heap size after garbagecollection
    is growing until the server runs out of memory. Can anyone tell me thebest
    way to identify the problem?
    Thanks,
    Derek

  • Possible memory leak in TagFileTagInfo class

    Hello,
    Our application is experiencing a memory leak in Weblogic, which is not happening in other application servers.
    We are running Weblogic server 10.3 using the distributed jsf 1.2
    Eclipse Memory Analyzer clearly points to TagFileTagInfo class as retaining a Map which holds all the memory. Furthermore, it shows that said map (called _tagFileInfoMap) is holding FileTagFileInfo class instances.
    It could be possible that our application were doing something wrong, and that would cause the described behavior, however I doubt that as the other application servers where our application is deployed do not present this problem.
    Any suggestion on how we should proceed to fix this problem?
    Thanks
    Juan

    Hi,
    Was this issue resolved by using wlappc?
    Were you able to compile the tag files with wlappc? I tried compiling the jsps using wlappc, but it seems that the tool expects an ejb-jar file.
    Any help on this is greatly appreciated.
    Thanks
    Hareesh

  • Memory leak in a client using EJBs deployed in a Bea Weblogic 10.0.0 cluste

    Hi all,
    We are having a memory leak in a client using stateless EJBs deployed in cluster. The client is a Tomcat 6.0.18 with java 6 but it is reproduced using Tomcat 5 with java 5. The client is calling a Weblogic Server 10.0 making
    calls to an EJB deployed in cluster that has two instances installed in two different machines.
    The client works fine if we shutdown one of the server instances and so when the client is using only one instance.
    Resuming the environment:
    Client Side:
    1 HP-Itanium machine with HP-UX.
    1 Tomcat 6 with java 6 (reproduced with java 5)
    Bea Weblogic client (wlclient.jar) for Weblogic 10.0.0
    Server Side:
    2 HP-Itanium machines with HP-UX
    Bea Weblogic Server 10.0.0 installed in both machines
    An unique domain
    Two Bea instances (one per machines) associated to a Bea Cluster
    EJBs deployed in both instances
    We have monitored the memory consumed in Tomcat and we have noticed that the VM memory PS OLD GEN grows up permanently when we make tests having the two server side Bea Instances up. We have extended
    the memory VM parameters in Tomcat client till 1G and it's only a way to delay the end: the free memory is empty, the GC is not able to free no more byte and the CPU is 100% consumed by the GC work. At the end Tomcat Client
    doesn't accept more http petitions and must be restarted.
    Besides, we have studied the VM memory in Tomcat using jmap and importing it using Eclipse Memory Analyzer. We have seen some strange memory blocks of several Mbytes that are always growing up and that are stored
    under data structures in the package com.sun.corba:
    com.sun.corba.se.impl.legacy.connection.SocketFactoryConnectionImpl (4.5Mb)
    |
    -> com.sun.corba.se.impl.transport.CorbaResponseWaitingRoomImpl
    |
    -> java.util.Hashtable
    |
    -> java.util.Hashtable$Entry
    |
    -> java.util.Hashtable$Entry
    -> java.util.Hashtable$Entry
    -> java.util.Hashtable$Entry
    Has anybody any idea about this problem?
    Thanks in advance.

    Hi all,
    We are having a memory leak in a client using stateless EJBs deployed in cluster. The client is a Tomcat 6.0.18 with java 6 but it is reproduced using Tomcat 5 with java 5. The client is calling a Weblogic Server 10.0 making
    calls to an EJB deployed in cluster that has two instances installed in two different machines.
    The client works fine if we shutdown one of the server instances and so when the client is using only one instance.
    Resuming the environment:
    Client Side:
    1 HP-Itanium machine with HP-UX.
    1 Tomcat 6 with java 6 (reproduced with java 5)
    Bea Weblogic client (wlclient.jar) for Weblogic 10.0.0
    Server Side:
    2 HP-Itanium machines with HP-UX
    Bea Weblogic Server 10.0.0 installed in both machines
    An unique domain
    Two Bea instances (one per machines) associated to a Bea Cluster
    EJBs deployed in both instances
    We have monitored the memory consumed in Tomcat and we have noticed that the VM memory PS OLD GEN grows up permanently when we make tests having the two server side Bea Instances up. We have extended
    the memory VM parameters in Tomcat client till 1G and it's only a way to delay the end: the free memory is empty, the GC is not able to free no more byte and the CPU is 100% consumed by the GC work. At the end Tomcat Client
    doesn't accept more http petitions and must be restarted.
    Besides, we have studied the VM memory in Tomcat using jmap and importing it using Eclipse Memory Analyzer. We have seen some strange memory blocks of several Mbytes that are always growing up and that are stored
    under data structures in the package com.sun.corba:
    com.sun.corba.se.impl.legacy.connection.SocketFactoryConnectionImpl (4.5Mb)
    |
    -> com.sun.corba.se.impl.transport.CorbaResponseWaitingRoomImpl
    |
    -> java.util.Hashtable
    |
    -> java.util.Hashtable$Entry
    |
    -> java.util.Hashtable$Entry
    -> java.util.Hashtable$Entry
    -> java.util.Hashtable$Entry
    Has anybody any idea about this problem?
    Thanks in advance.

  • Memory leak after connect from Weblogic 8.1 to oracle 9.1.2

    Hi,
    I have a application migrated from Weblogic 6.1 to Weblogic 8.1. It is working
    fine in weblogic 6.1. But it has memmory leak in weblogic 8.1. My current system
    is
    Solaris 9 with weblogic 8.1(SP2)
    Solaris 9 with oralce 9i
    The problem happen when the application is running for some time. All memory
    is ate out in oracle instance. But the weblogic is alive. And in fact oracle
    is alive too but it is not allowed for any future connection. Then after that,
    all hang. We need to restart both webligc and oracle instances.
    Does anyone can help on this? Is any specicial things in weblogic 8.1 for JDBC
    connection? Thank you very much.
    Yang Lin

    "YangL" <[email protected]> wrote in message news:[email protected]..
    I have a application migrated from Weblogic 6.1 to Weblogic 8.1. It is working
    fine in weblogic 6.1. But it has memmory leak in weblogic 8.1. My current system
    is
    Solaris 9 with weblogic 8.1(SP2)
    Solaris 9 with oralce 9i
    The problem happen when the application is running for some time. All memory
    is ate out in oracle instance. But the weblogic is alive. And in fact oracle
    is alive too but it is not allowed for any future connection. Then after that,
    all hang. We need to restart both webligc and oracle instances.
    Does anyone can help on this? Is any specicial things in weblogic 8.1 for JDBC
    connection? Thank you very much.Check with your DBA - he/she should have enough tools to tell
    what has happened on the Oracle side.
    Regards,
    Slava Imeshev

  • How to configure license file for Memory Leak tool and WL Server 9.2?

    (I posted to general JRockit forum before realizing existence of this forum which is probably more applicable.)
    Here's our problem:
    Running latest version of WL 9.2 MP3 and JRockit Mission Control 3.0.1
    Able to run Mission Control, and connect to the WL Server and to run View Console with no problems.
    I can't get Memory Leak tool to run because it complains about needing a license file.
    First I tried with off the shelf WL 9.2 MP3.
    Get error:
    A license for Memory Leak Detector could not be found on the JRockit at (1.5) weblogic.Server (192).
    Error: Can not find component Memory Leak Detector for JRockit * in the license file. Please check http://www.jrockit.com/license for license updates.
    So I downloaded license file from JRockit download site - wls92.zip. It contains several files, but no clear instructions on what to do with these files. I copied one of these files "LIC-WLSP92.txt" to my JRockit home as C:\bea\JROCKI~1\jre\license.bea
    Tried again. Restarted WL server. Restarted JRockit Mission Control.
    Get error: A license for Memory Leak Detector could not be found on the JRockit at (1.5) weblogic.Server (3052).
    The license file does not exist at: C:\bea\JROCKI~1\jre\license.bea
    Any advise on how to install license or who to contact for help?

    Installed Mission Control 3.0.3.
    Got following message when I attempted to run Memory Leak:
    A license for Memory Leak Detector could not be found on the JRockit at (1.5) weblogic.Server (192).
    Error: Can not find component Memory Leak Detector for JRockit * in the license file.
    Please check http://www.jrockit.com/license for license updates.
    I believe that we're using the latest downloads of WebLogic 9.2.x and JRockit.
    WebLogic is running using 9.2.3 and JRockit build R27.4.0-90_CR358515-94243-1.5.0_12-20080118-1154-windows-ia2
    Contents of C:\bea\jrockit_150_12\jre\license.bea:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <bea-licenses>
    <license-group format="1.0" product="JRockit" release="*">
    </license-group>
    </bea-licenses>
    Could WebLogic be misconfigured?
    Any diagnostics to help figure out the licensing?
    Any other ideas?

  • JBoss EAP 6 On JRockit - Memory Leak

    hello team.
    I have memory leak problem on jboss and jrockit.
    My Environment :
    1. OS :          
    CentOS release 6.4 (Final)
    2. JRockit :     
    java version "1.6.0_45"
         Java(TM) SE Runtime Environment (build 1.6.0_45-b06)
         Oracle JRockit(R) (build R28.2.7-7-155314-1.6.0_45-20130329-0641-linux-x86_64, compiled mode)
    3. Application Server:
    JBoss EAP 6.2.0.GA
    4. Application
    Large EJB Application (100 and more EJB Beans (Stateless, Stateful,  MDB, Timers and so on)
    Everything works fine on older application server versions (4.3 , 4.2)
    But now I have Problem
    Of course I know that problem is new version - and i have discussion on JBoss forums.
    but guys I have question about jrockit with you:
    What is the option "Other" in memory ??
    [jboss@jboss-new bin]$ jrcmd 17114  print_memusage
    17114:
    Total mapped                       8457864KB           (reserved=2983100KB)
    -              Java heap              3145728KB           (reserved=0KB)
    -              GC tables            105232KB         
    -          Thread stacks       46412KB           (#threads=138)
    -          Compiled code       1048576KB           (used=12257KB)
    -               Internal                   1480KB         
    -                     OS       170324KB         
    -                  Other       3639056KB         
    -            Classblocks         10496KB           (malloced=9631KB #28393)
    -        Java class data       289536KB           (malloced=192391KB #133697 in 28393 classes)
    - Native memory tracking     1024KB           (malloced=294KB #10)
    [jboss@jboss-new bin]$
    This size increases every time - and took entire amount of RAM.
    Thank in Advance.
    Regards,
    Paata Lominadze

    Not sure what the 'other' is, but it is probably best shown by using an example. By using displayMap we can display a memory map of various JVM subsystems and libraries that are loaded, including third-party libraries.
    ./jrcmd 4523 print_memusage displayMap
    Total mapped                  3984796KB           (reserved=2978740KB)
    -              Java heap       524288KB           (reserved=0KB)
    -              GC tables        17548KB         
    -          Thread stacks        20276KB           (#threads=39)
    -          Compiled code      1048576KB           (used=14224KB)
    -               Internal         1672KB         
    -                     OS       146924KB         
    -                  Other      2092648KB         
    -            Classblocks         7424KB           (malloced=7381KB #20064)
    -        Java class data       124416KB           (malloced=124411KB #91048 in 20064 classes)
    - Native memory tracking         1024KB           (malloced=118KB #10)
    +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        OS                          *java    r x 0x0000000000400000.(     76KB)
        OS                          *java    rw  0x0000000000612000.(      4KB)
        OS                        *[heap]    rw  0x00000000007c1000.(    132KB)
       INT                           Poll    r   0x000000007fffe000 (      4KB)
       INT                         Membar    rw  0x000000007ffff000.(      4KB)
       MSP              Classblocks (1/2)    rw  0x00000000df8c0000 (   6912KB)
       MSP              Classblocks (2/2)    rw  0x00000000dff80000 (    512KB)
      HEAP                      Java heap    rw  0x00000000e0000000.( 524288KB)
        OS                    *ld-2.12.so    r x 0x0000003664400000.(    128KB)
        OS                    *ld-2.12.so    r   0x000000366461f000 (      4KB)
        OS                    *ld-2.12.so    rw  0x0000003664620000 (      4KB)
        OS                   **ld-2.12.so    rw  0x0000003664621000.(      4KB)
       OS           *gconv-modules.cache    r   0x00007f8f2e4a0000 (     28KB)
    THREAD                     Stack 4630    rwx 0x00007f8f2e4a7000 (      8KB)
    THREAD                     Stack 4630        0x00007f8f2e4a9000 (     12KB)
    THREAD                     Stack 4630    rwx 0x00007f8f2e4ac000 (    244KB)
       MSP         Java class data (5/37)    rw  0x00007f8f2e4e9000 (  14336KB)
       MSP         Java class data (9/37)    rw  0x00007f8f2fa40000 (   5888KB)
                                             rw  0x00007f8f30000000 (    188KB)
                                                 0x00007f8f3002f000 (  65348KB)
                                             rw  0x00007f8f34000000 (    132KB)
                                                 0x00007f8f34021000 (  65404KB)
                                             rw  0x00007f8f38000000 (    412KB)
                                                 0x00007f8f38067000.(  65124KB)
       MSP        Java class data (10/37)    rw  0x00007f8f3c034000 (  34048KB)
                                             rw  0x00007f8f3e174000 (   8200KB)
       MSP        Java class data (11/37)    rw  0x00007f8f3e976000 (    256KB)
        OS                     *libhpi.so    rw  0x00007f8fb37fc000 (      8KB)
        OS                    **libhpi.so    rw  0x00007f8fb37fe000 (      4KB)
      CODE                  Compiled code    rwx 0x00007f8fb37ff000 (     64KB)
      CODE                  Compiled code    rwx 0x00007f8fb380f000 (    128KB)
      CODE                  Compiled code    rwx 0x00007f8fb382f000 (     64KB)
      MSP        Java class data (37/37)    rw  0x00007f8ff83a1000 (    512KB)
        GC Modified Union Set (committed)    rw  0x00007f8ff8421000 (    132KB)
        GC                     Card table    rw  0x00007f8ff8442000 (   1024KB)
        GC        Object bits (committed)    rw  0x00007f8ff8542000 (   8196KB)
    Here
    - thread is thread related (such as thread stacks)
    - int, internal use (such as pointer pages)
    - heap, chunk used by JRockit for the Java heap
    - os, mapped directly from the operating system, such as third party DLLs or shared objects
    - msp, memory space. a memory space is a native heap with a specific purpose, for example native memory allocation inside the JVM
    - gc, garbage collection related, for example live bits
    - code, compiled code
    The 'other' memory space looks to me (from the blank entries in the above print-out) like they are a memory pages to are still not used. When the JVM starts it mappes an amount of memory. To my knowledge JRockit uses mmap (mmap(2) - Linux manual page), which creates a new mapping in the virtual address space. JRockit reserves an amount of memory (Java Heap (heap where your object instances go) + its own runtime (all the others)).
    To see where the growth is in the various memory spaces, you can use 'print_memusage baseline', after which you can execute print_memusage again, for example,
    ./jrcmd 4523 print_memusage scale=M
    4523:
    Total mapped                     3896MB      +4MB (reserved=2905MB -3MB)
    -              Java heap          512MB           (reserved=0MB)
    -              GC tables           17MB         
    -          Thread stacks           19MB           (#threads=39)
    -          Compiled code         1024MB           (used=14MB +1MB)
    -               Internal            1MB         
    -                     OS          143MB         
    -                  Other         2043MB         
    -            Classblocks            7MB           (malloced=7MB #20596 +532)
    -        Java class data          126MB      +4MB (malloced=125MB +4MB #93640 +2592 in 20596 classes)
    - Native memory tracking            1MB           (malloced=0MB #20 +10)
    Note the additional column that prints out the difference in memory usage in relation to the baseline. You can also monitor native allocations by using trace_alloc_sites, memory allocations can then be displayed with different levels of detail using the level argument.
    ./jrcmd 4523 print_memusage trace_alloc_sites=true
    4523:
    Total mapped                  3989660KB   +4864KB (reserved=2974732KB -4008KB)
    -              Java heap       524288KB           (reserved=0KB)
    -              GC tables        17548KB         
    -          Thread stacks        20276KB           (#threads=39)
    -          Compiled code      1048576KB           (used=15265KB +1040KB)
    -               Internal         1672KB         
    -                     OS       146924KB         
    -                  Other      2092648KB         
    -            Classblocks         7680KB    +256KB (malloced=7669KB +287KB #20596 +532)
    -        Java class data       129024KB   +4608KB (malloced=128967KB +4555KB #93640 +2592 in 20596 classes)
    - Native memory tracking         1024KB           (malloced=236KB +118KB #20 +10)
    ./jrcmd 4523 print_memusage level=3
    4523:
    Total mapped                  3989660KB   +4864KB (reserved=2974732KB -4008KB)
    -              Java heap       524288KB           (reserved=0KB)
    -              GC tables        17548KB         
    -          Thread stacks        20276KB           (#threads=39)
    -          Compiled code      1048576KB           (used=15265KB +1040KB)
    -               Internal         1672KB         
    -                     OS       146924KB         
    -                  Other      2092648KB         
    -            Classblocks         7680KB    +256KB (malloced=2KB -7379KB #4 -20060) Not fully traced
    -        Java class data       129024KB   +4608KB (malloced=26KB -124385KB #16 -91032 in 20596 classes) Not fully traced.
    - Native memory tracking         1024KB           (malloced=118KB #10) Not fully traced.
         gather_memorymap_database                     memtrace.c: 206         91KB     +91KB (#1 +1)
               gather_memory_usage                  osal_mspace.c:5142          7KB      +7KB (#4 +4)
      msGatherMSpacesUsageDatabase                  osal_mspace.c:6128          2KB      +2KB (#1 +1)
      msGatherMSpacesUsageDatabase                  osal_mspace.c:6134         16KB     +16KB (#1 +1)
    Note this is more on the JVM level, in your case in might be beneficial to investigate what is happening on the java heap. By using print_object_summary you can get insight how memory on the heap is used on a per-class basis. To get to the bottom of where the memory leak is you can use the memory-leak-detector (an example of its use can be found here Middleware Snippets: Fast, Faster, JRockit). You can also obtain a heapdump that can be analyzed by using for example MAT (see for an example here Middleware Snippets: Visualizing Class Loading). To obtain a heapdump you can run the command, for example,
    [weblogic@machine1 bin]$ ./jrcmd 4523 runsystemgc full=true fullcompact=true
    4523:
    [weblogic@machine1 bin]$ ./jrcmd 4523 hprofdump filename=/home/weblogic/dump.hprof
    4523:
    Wrote dump to /home/weblogic/dump.hprof
    Note that this first issues a full GC by using the runsystemgc command.

  • Memory leak in Solaris - SunOS 5.7, jre1.3.1

    Hi,
    I hava a java application that spawns about 100 threads. Each thread sends a request to WebLogic server 6.1. We are using Oracle 8.1.7. They are all running in a Sun box, 2 CPUs and 6gig memory.
    JRE = 1.3.1
    SunOS = 5.7
    Weblogic = 6.1
    Oracle = 8.1.7
    (All running on the same box)
    When we start the client application, running top shows that ,
    the client JVM process - uses 40 MB of memory
    WebLogic - uses 250 MB of memory
    But the available memory comes down drastically (almost by 350 MB), and on bringing both the client and weblogic down, we are not able to get this 350 MB back
    Running JProbe, doen not show any memory leak in our application
    we are using the hotspot client version
    -Xms = 128m
    -Xmx = 128m
    Any help is appreciated

    It looks like i am also facing the same problem with my application . If by some chance you were able to solve this problem do send a mail to [email protected] I just posted the question. while searching the web i found your question which looks similar but not answered. Hope you could give me some input
    Thanks

  • Memory leak and char[] ?

    Hello all,
    I'm not sure whether this post should be here or in WebLogic section, so correct me if I'm wrong.
    I'm working on JDeveloper 11.1.1.3 while deployments are made on standalone WebLogic 10.3.3. This thing occurred in previous versions also.
    With every deployment WebLogic increases it's used memory until the famous PermGen space error, which is after about 5-6 deployments.
    I'm doing my best to understand how to use memleak detection tools. I've switched JDev and WL from Sun jdk which was used before to JRockit, same thing happens. Both JDev's memory profiler and JRockit mission control show something that I really do not understand. char[] uses around 30% of heap space and keeps growing with deployments, next is String with 8%. I never use char in app.
    Am I looking at the wrong thing? Is it normal for char[] to increase on WebLogic on deployments? Does anyone know how to check other things and what to check? Someone on other forums mentioned it would be useful to check if ApplicationContext keeps initializing over again on deployments. Does anyone know how to check this?
    One more thing, I have successfully deployed app on Tomcat, and Tomcat said there is a memory leak in app, but could not tell anything specific.
    I'm kinda lost in this :(

    It is normal for the PermGen space of the Sun's JVM to get filled after several re-deployments. PermGen stands for "permanent generational". This space is used by classes that is unlikely to need to be garbage-collected, so they are placed in this memory space that is never garbage-collected (for example, the Class instances). When you redeploy an application, a new class loader instance is used and it instantiates new Class instances that fill up the PermGen space. But why this happens on JRockit either, I could not explain.
    We have experienced memory leaks related to classes and components that use native memory. For example, we have had significant memory leak when using Oracle's JDBC OCI driver. We were not able to solve this problem, so we switched to JDBC Thin driver (which is very performant and stable today comparing to some years ago). If you are using Oracle JRockit, you can monitor the overall memory usage by the following JRockit command executed at OS command line:
    jrcmd <jrockit_pid> print_memusage>where <jrockit_pid> should be replaced by the JVM process ID.
    If you suspect existence of native memory leaks, then have a look at the article Thanks for the memory for explanations about how Java uses native memory.
    Dimitar

  • Memory Leaking message when run the log in page in Jdev 11.1.2

    Hi
    I am re design our 10g application in Jdev 11.1.2, I am using .jsf and ADF business component.
    at the moment, the project has only two pages. login and home page.
    when I run the login page, I see the message below. this is happening during the deployment process to the embeded weblogic
    <ADFContext> <getCurrent> Automatically initializing a DefaultContext for getCurrent.
    Caller should ensure that a DefaultContext is proper for this use.
    Memory leaks and/or unexpected behaviour may occur if the automatic initialization is performed improperly.
    This message may be avoided by performing initADFContext before using getCurrent().
    For more information please enable logging for oracle.adf.share.ADFContext at FINEST level.
    Anyone know why?
    thanks

    Hi Timo
    Thanks for your reply, I read the thread you pointed to.
    however, I am not sure my is related to the case mentioned. I am re design the application from scratch in Jdev 11.1.2, and my adfc-config.xml is as simple as this:
    <?xml version="1.0" encoding="windows-1252" ?>
    <adfc-config xmlns="http://xmlns.oracle.com/adf/controller" version="1.2">
    <view id="Login">
    <page>/commom/Login.jsf</page>
    </view>
    <view id="home">
    <page>/commom/home.jsf</page>
    </view>
    <control-flow-rule id="__2">
    <from-activity-id>*</from-activity-id>
    <control-flow-case id="__3">
    <to-activity-id>Login</to-activity-id>
    </control-flow-case>
    </control-flow-rule>
    <control-flow-rule id="__4">
    <from-activity-id>Login</from-activity-id>
    <control-flow-case id="__5">
    <from-outcome>success</from-outcome>
    <to-activity-id>home</to-activity-id>
    </control-flow-case>
    </control-flow-rule>
    <managed-bean id="__1">
    <managed-bean-name>backing_login</managed-bean-name>
    <managed-bean-class>com.mycompany.view.backing.login</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    </managed-bean>
    </adfc-config>
    also, I am using a session filter registered in web.xml --- basically, if the page is not Login.jsf then redirect to Login.jsf page. but even though I removed the session filter.java from the web.xml , it still show the message.

  • Memory leak in Callable Statement

    We are using Weblogic 6.1 and Oracle 8.1.7 for an application we are developing.
    Usage of callable statement seems to be resulting an a memory leak. The program runs
    in a loop and after processing 200 records, java.lang.outofMemory Exception is thrown
    We are unable to figure out a reason for the same.
    The code snippet is as below
    try
    //dbConn = ImportPODBConnect.getDBConnection(dsJNDIName, dsURL); //connect
    to DB <br>
    dbConn = DBConnect.getDBConnection(dsJNDIName, dsURL);
    //query = POQueries.selectPO(poId); //get the required
    query statement from the POQueries utility class
                             Print.log(" in getPO() ----> ********* before 1st stmt " + System.currentTimeMillis());
                        cstmt = dbConn.prepareCall("{ ? = call PO_HEADER_PROC(?)}");
                        cstmt.registerOutParameter(1, OracleTypes.CURSOR);
                   cstmt.setFloat(2, poId);
                   // execute and retrieve the result set
                   cstmt.execute();
                   getPORs = (ResultSet)cstmt.getObject(1);
                             Print.log(" in getPO() ----> ********* after 1st stmt " + System.currentTimeMillis());
                             if (!getPORs.next()) //if nothing returned then
    throw an exception
                                  Print.log("Unable to get the required PO:" + poId);
                                  throw new Exception("Unable to get the required PO:" + poId);
                             else //set all the variables
    of the PO header objects from the result set
                                  pohSl = new POHeaderSl();
                                  pohSl.setOvUserName(getPORs.getString("OVA_USER_NAME"));
                                  pohSl.setOvCompanyName(getPORs.getString("OVA_COMPANY_NAME"));
                                  pohSl.setAgent(getPORs.getString("AGENT"));
                                  pohSl.setApprovalCode(getPORs.getString("APPROVAL_CODE"));
                                  pohSl.setBrand(getPORs.getString("BRAND"));
                                  pohSl.setBusinessSegment(getPORs.getString("BUSINESS_SEGMENT"));
                                  pohSl.setBusinessSubSegment(getPORs.getString("BUSINESS_SUB_SEGMENT"));
                                  pohSl.setBuyDate(getPORs.getString("BUY_DATE"));
                                  pohSl.setCareContentLabel(getPORs.getString("CARE_CONTENT_LABEL"));
                                  pohSl.setCartonMarkings1(getPORs.getString("CARTON_MARKINGS_1"));
                                  pohSl.setCartonMarkings2(getPORs.getString("CARTON_MARKINGS_2"));
                                  pohSl.setCartonMarkings3(getPORs.getString("CARTON_MARKINGS_3"));
                                  pohSl.setCartonMarkings4(getPORs.getString("CARTON_MARKINGS_4"));
                                  pohSl.setComments(getPORs.getString("COMMENTS"));
                                  pohSl.setCommissionPerUnit(getPORs.getString("COMMISSION_PER_UNIT"));
                                  pohSl.setCompanyId(getPORs.getString("COMPANY_ID"));
                                  pohSl.setCompulsoryString(getPORs.getString("COMPULSORY_STRING"));
                                  pohSl.setConTimestamp(getPORs.getString("CON_TIMESTAMP"));
                                  pohSl.setCurrency(getPORs.getString("CURRENCY"));
                                  pohSl.setCustomerBillToNumber(getPORs.getString("CUSTOMER_BILL_TO_NUMBER"));
                                  pohSl.setCustomerLcBank(getPORs.getString("CUSTOMER_LC_BANK"));;
                                  pohSl.setCustomerLcDate(getPORs.getString("CUSTOMER_LC_DATE"));
                                  pohSl.setCustomerLcExpiryDate(getPORs.getString("CUSTOMER_LC_EXPIRY_DATE"));
                                  pohSl.setCustomerLcNumber(getPORs.getString("CUSTOMER_LC_NUMBER"));
                                  pohSl.setCustomerPoNumber(getPORs.getString("CUSTOMER_PO_NUMBER"));
                                  pohSl.setCustomerSaleDept(getPORs.getString("CUSTOMER_SALE_DEPT"));
                                  pohSl.setCustomerShipToNumber(getPORs.getString("CUSTOMER_SHIP_TO_NUMBER"));
                                  pohSl.setCustomerSo(getPORs.getString("CUSTOMER_SO"));
                                  pohSl.setDateLastModifiedErp(getPORs.getString("DATE_LAST_MODIFIED_ERP"));
                                  pohSl.setDateLastModifiedOv(getPORs.getString("DATE_LAST_MODIFIED_OV"));
                                  pohSl.setDateOfActivation(getPORs.getString("DATE_OF_ACTIVATION"));
                                  Print.log(" ******** inside getPO() ----- > ****** built Header" + System.currentTimeMillis()
                                  if(getPORs != null)
                                       getPORs.close();
                                       getPORs = null;
                                  if(cstmt != null)
                                       Print.log("In the close");
                                       cstmt.close();
                                       cstmt = null;
                        catch (Exception e)
                             System.out.println(" in dataAccess.getPO() ----- > " + e.toString());
                             throw new Exception(e.toString()); //if there are any exceptions
    then throw back the exceptions
                        finally //finally block to release any connections
    and statement objects
                             if(getPORs != null)
                                  getPORs.close();
                                  getPORs = null;
                             if (pstmt!=null)
                                  pstmt.close();
                                  pstmt = null;
                             if (cstmt!=null)
                                  cstmt.close();
                                  cstmt = null;
                             if (dbConn!=null)
                                  dbConn.close();
                                  dbConn = null;
                        return poSl; //return the PO object
    Can anyone help with this?

    hi
    This may happen when you open resultset objects and not close them properly.
    Try to ensure that, you should close the objects in individual try catch
    blocks so that one failure will not cause other close's to be skipped.
    You can try one more thing, I don't see you are using any LONG/ LONG
    RAW/BLOB/CLOB columns from your code here. If the table which you are trying
    to retrieve data from has this type of data you will benefit from using some
    tuning parameters here and may be able to avoid out of memory exceptions,
    take a look at the url,
    http://e-docs.bea.com/wls/docs61/oracle/advanced.html#1158561
    especially, try using,
    weblobic.oci.selectBlobChunkSize and set it to something low. you can set
    these properties on the connection pool.
    sree
    "Murali" <[email protected]> wrote in message
    news:[email protected]...
    >
    >
    We are using Weblogic 6.1 and Oracle 8.1.7 for an application we aredeveloping.
    Usage of callable statement seems to be resulting an a memory leak. Theprogram runs
    in a loop and after processing 200 records, java.lang.outofMemoryException is thrown
    >
    We are unable to figure out a reason for the same.
    The code snippet is as below
    try
    //dbConn = ImportPODBConnect.getDBConnection(dsJNDIName, dsURL);//connect
    to DB <br>
    dbConn = DBConnect.getDBConnection(dsJNDIName, dsURL);
    //query = POQueries.selectPO(poId); //getthe required
    query statement from the POQueries utility class
    Print.log(" in getPO() ----> ********* before 1st stmt " +System.currentTimeMillis());
    >
    cstmt = dbConn.prepareCall("{ ? = call PO_HEADER_PROC(?)}");
    cstmt.registerOutParameter(1, OracleTypes.CURSOR);
    cstmt.setFloat(2, poId);
    // execute and retrieve the result set
    cstmt.execute();
    getPORs = (ResultSet)cstmt.getObject(1);
    Print.log(" in getPO() ----> ********* after 1st stmt " +System.currentTimeMillis());
    >
    if (!getPORs.next()) //if nothing returnedthen
    throw an exception
    Print.log("Unable to get the required PO:" + poId);
    throw new Exception("Unable to get the required PO:" + poId);
    else //set all thevariables
    of the PO header objects from the result set
    pohSl = new POHeaderSl();
    pohSl.setOvUserName(getPORs.getString("OVA_USER_NAME"));
    pohSl.setOvCompanyName(getPORs.getString("OVA_COMPANY_NAME"));
    pohSl.setAgent(getPORs.getString("AGENT"));
    pohSl.setApprovalCode(getPORs.getString("APPROVAL_CODE"));
    pohSl.setBrand(getPORs.getString("BRAND"));
    pohSl.setBusinessSegment(getPORs.getString("BUSINESS_SEGMENT"));
    pohSl.setBusinessSubSegment(getPORs.getString("BUSINESS_SUB_SEGMENT"));
    pohSl.setBuyDate(getPORs.getString("BUY_DATE"));
    pohSl.setCareContentLabel(getPORs.getString("CARE_CONTENT_LABEL"));
    pohSl.setCartonMarkings1(getPORs.getString("CARTON_MARKINGS_1"));
    pohSl.setCartonMarkings2(getPORs.getString("CARTON_MARKINGS_2"));
    pohSl.setCartonMarkings3(getPORs.getString("CARTON_MARKINGS_3"));
    pohSl.setCartonMarkings4(getPORs.getString("CARTON_MARKINGS_4"));
    pohSl.setComments(getPORs.getString("COMMENTS"));
    pohSl.setCommissionPerUnit(getPORs.getString("COMMISSION_PER_UNIT"));
    pohSl.setCompanyId(getPORs.getString("COMPANY_ID"));
    pohSl.setCompulsoryString(getPORs.getString("COMPULSORY_STRING"));
    pohSl.setConTimestamp(getPORs.getString("CON_TIMESTAMP"));
    pohSl.setCurrency(getPORs.getString("CURRENCY"));
    pohSl.setCustomerBillToNumber(getPORs.getString("CUSTOMER_BILL_TO_NUMBER"));
    pohSl.setCustomerLcBank(getPORs.getString("CUSTOMER_LC_BANK"));;
    pohSl.setCustomerLcDate(getPORs.getString("CUSTOMER_LC_DATE"));
    pohSl.setCustomerLcExpiryDate(getPORs.getString("CUSTOMER_LC_EXPIRY_DATE"));
    pohSl.setCustomerLcNumber(getPORs.getString("CUSTOMER_LC_NUMBER"));
    pohSl.setCustomerPoNumber(getPORs.getString("CUSTOMER_PO_NUMBER"));
    pohSl.setCustomerSaleDept(getPORs.getString("CUSTOMER_SALE_DEPT"));
    pohSl.setCustomerShipToNumber(getPORs.getString("CUSTOMER_SHIP_TO_NUMBER"));
    pohSl.setCustomerSo(getPORs.getString("CUSTOMER_SO"));
    pohSl.setDateLastModifiedErp(getPORs.getString("DATE_LAST_MODIFIED_ERP"));
    pohSl.setDateLastModifiedOv(getPORs.getString("DATE_LAST_MODIFIED_OV"));
    pohSl.setDateOfActivation(getPORs.getString("DATE_OF_ACTIVATION"));
    Print.log(" ******** inside getPO() ----- > ****** built Header" +System.currentTimeMillis()
    if(getPORs != null)
    getPORs.close();
    getPORs = null;
    if(cstmt != null)
    Print.log("In the close");
    cstmt.close();
    cstmt = null;
    catch (Exception e)
    System.out.println(" in dataAccess.getPO() ----- > " + e.toString());
    throw new Exception(e.toString()); //if there are anyexceptions
    then throw back the exceptions
    finally //finally block to release anyconnections
    and statement objects
    if(getPORs != null)
    getPORs.close();
    getPORs = null;
    if (pstmt!=null)
    pstmt.close();
    pstmt = null;
    if (cstmt!=null)
    cstmt.close();
    cstmt = null;
    if (dbConn!=null)
    dbConn.close();
    dbConn = null;
    return poSl; //return the PO object
    Can anyone help with this?

Maybe you are looking for

  • In the View Responses functionality

    In the View Responses section of a form, can I make the options for a datapoint a dropdown field rather than a free form field?

  • How to insert more t then one web item into single tab in WAD

    Hi Gurus , How can i insert one Chart , table and dropdown item into same tab in wad Please advice TQ BR

  • Portal Logoff delaying.

    Dear All, I'm facing the problem like while click on logoff, it will take time to logoff. My system is running on EP7.01 SP3. Please reply back how to resolve this. Really appriciated your inputs. Thanks and Regards, Mahee.

  • Your Ideas please ..

    Hi All, We recently developed a J2EE App using IIS and JRUN. Our URL for the application is http://myapp.company.com/ Now, I need to do the following mapping to work as well.. http://mycompany Can somehow help me with this ? Please remember that Iam

  • Divs to stick together?

    I have a page i'm working on at http://www.metrocog.org/index061613.html I'm trying to learn how to postion the div on the right of the slideshow so it dose not move when the page is resized. Right now I have them together but if you shrink the page