Memory Leak In OC4J_WSRP Jsp Portlet

Hi All
I have the following problem:
I have several JSP portlets deployed in the OracelAS OC4J_WSRP container.
These portlets do a DB Access (using OracleAS connection pooling), call a remote Web Service parse the XML response and finally display the data to the user.
We are in development period which means that we continuously deploy or redeploy the portlets using JDeveloper.
The problem is that after 5 to 6 days an java.lang.outofmemory exception is thrown and all portlets deployed to this container stop working (we see a 500 Internal Server Error to the portal pages that use these portlets).
We need to restart the OC4J_WSRP container to get the portlets back working.
Obviously the JVM of the container runs out of memory and cannot serve further requests.
But the big question is WHAT is causing the problem?
I have noticed that the Memory usage metric in Oracle Enterprise Manager Application Server Control steadily increases over time and when it reaches about 125Mb then I get the OutofMemory exception.
Another metric that steadily increases is the total JDBC connections but I am not sure if this is a problem or not as no Documentation from Oracle provides sufficient explanation of what this number is all about!!
I have also noticed that each time we redeploy the provider that contains the portlets to the OC4J_WSRP container the Memory Usage increases significantly (about 2Mb more) and this memory is never given back to the OS but only when the OC4J_WSRP is restarted...
Does anybody have an explanation to this?
Thank you

Do you mean the OC4J_WSRP container?
Is it a production system or you are in development period??
Because I suspect that the memory increases with the continuous re-deployments of the provider.
maybe if we discuss the problem we will be able to find a solution together...

Similar Messages

  • Memory leak with jsp and beans

    The application we have created has one particular page that is designed to stay up in the browser and refresh with new information from database queries once every 60 seconds. Running with Tomcat3.2.1 and IE5.5
    The problem is that the memory usage of java.exe continues to grow until the machine crashes from out of memory. It does take more than 24 hours to crash.
    Things I have tried to do to track down the problem or eliminate the problem.
    - I have explicitly set the scope of the beans to "page"
    - I have watched the DatabaseAccess.class (the beans are all extended from this class) and put in code to watch how many instantiations of the class are made and subsequently garbage collected. This appears to be where the memory leak may reside - hundreds of instantiations from some other source than the page I am displaying.
    - the top frame makes database queries for security and display of a menu system dependant upon security clearance. It does not set any time for refresh (refresh == 0). Nor does it explicitly set a scope for the beans.
    - I have run a different jsp engine to see if this was directly related to Tomcat - same problem with resin2.0.0
    The main jsp page that is in the bottom section of the page has the following code:
    ** only the relevant lines are included here
    <%@ include file="../../common.jsp" %>
    <%
         refresh=60;
    %>
    <head>
    <%@ include file="../../meta_head.jsp" %>
    </head>
    <body bgcolor="#FFFFFF" text="#003399" link="#660099" vlink="#990099" alink="#006666" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
    <%@ include file="../../access.jsp" %>
    <%@ include file="../../page_title.jsp" %>
    <jsp:useBean id="Line" class="jsp.Line" scope="page" />
    <jsp:useBean id="Machine" class="jsp.Machine" scope="page"/>
    <jsp:useBean id="Alarm_log" class="jsp.Alarm_log" scope="page"/>
    contents of meta_head.jsp
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <META HTTP-EQUIV= "expires" content = "0">
    <META HTTP-EQUIV="Pragma" CONTENT="no_cache">
    <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache" forua="true">
    <META NAME="robots" content="NOINDEX,NOFOLLOW">
    <%
    if (refresh > 0)
    %>
    <meta http-equiv="Refresh" content="<%= refresh %>">
    <%
    If anyone has some suggestions on how to trap this memory leak, it would be terrific. Or, some other things to try to stop the instantiation of the DatabaseAccess object (perhaps setting the scope of the beans in the header to "session" or "application"?).
    Thanks in advance.
    Roberta

    jsp:useBean tags scope declaration :
    page = Create a new instance on each load.
    session = Load instance from the session, if not there, create one
    application = Load instance from the ServletContext, if not there, create one.
    Not sure how you are populating the data variables, but make sure you are closing all ResultSet, (Prepared)Statement, and Connection objects.

  • Memory leak in JSP

    Hi everbody !
    We got big problems with memory on JSP. When the JPServer (TomCat, WebLogic or Jrun) is running and regular Http browser is running the memory still grows up and never go down. Even if you close the IE or NetScape it dosn't help. The only solution we found is to reset Web server but for furter use is not an option. Has anybody simiar problem and knows the resolution for it.
    Thx for any help
    Peter

    What version of JDK are you running? I use an in-house compile of JDK 1.3.1's Server VM (I won't go into the details, but Sun's release JDK's for Windows are built with a questionable version of MSVC that has known bugs relating to memory allocation and other things) which I have had resolve memory leak issues. I'm running JRun 3.1 on Windows 2000 with a dual-processor setup with no memory leak issues, and we have a project running JSP, servlets and EJBs with no problems.
    Could you give some more details on your configuration?
    - Kirk

  • JRC and JSP memory leak...

    Hi, I have an web application with Crystal Reports integrated via the JRC. However, I have a memory leak within the application. I have narrowed it down to the JSP which uses JRC code. The NetBeans profiler shows a memory leak, it appears to be a leak with the JRC code with the class (com.crystaldecisions.reports.exporters.format.page.pdf.pdflif.f). I have try changing the <timeout> tag in CRConfig and using .dispose() and .close(), all to no avail. This error may jepordize our latest production release... Please, help...

    Best to download 2.0 and install all patches and test again. If not resolved then post your issue with details and code samples.

  • 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 in string class

    We have developed our application in Solaris 10 environment. While running Purify on that it shows leak in the string class. This leak is incremental and so process size keeps in increasing. If we replace string with char array, the leaks disappears and process size also becomes stable.
    Following is the snapshot of the memory leak stack reported by Purify:
    MLK: 4505 bytes leaked in 85 blocks
    * This memory was allocated from:
    malloc [rtlib.o]
    operator new(unsigned) [libCrun.so.1]
    void*operator new(unsigned) [rtlib.o]
    __rwstd::__string_ref<char,std::char_traits<char>,std::allocator<char> >*std::basic_string<char,std::char_traits<char>,std::allocator<char> >::__getRep(unsigned,unsigned) [libCstd.so.1]
    char*std::basic_string<char,std::char_traits<char>,std::allocator<char> >::replace(unsigned,unsigned,const char*,unsigned,unsigned,unsigned) [libCstd.so.1]
    std::basic_string<char,std::char_traits<char>,std::allocator<char> >&std::basic_string<char,std::char_traits<char>,std::allocator<char> >::operator=(const char*) [libCstd.so.1]
    Has anyone faced this problem earlier or is there any patch available for this?

    Over time, we have found and fixed memory leaks in the C++ runtime libraries.
    Get the latest patches for the compiler you are using. (You didn't say which one.) You can find all patches here:
    [http://developers.sun.com/sunstudio/downloads/patches/index.jsp]
    Also get the latest Solaris patch for the C++ runtime libraries, listed on the same web page.
    If that doesn't fix the problem, please file a bug report at
    [http://bugs.sun.com]
    with a test case that can be compiled and run to demonstrate the problem.

  • Memory leak on SunOne Web Server 6.1 on application reload

    Hi!
    I am pretty sure that i have found a memory management problem in
    SunOne Web Server 6.1 .
    It started with an OutOfMemory error we got under heavy load . After
    some profiling with Jprofiler i didn't find any memory leaks in the
    application.Even under heavy load (generated by myself) i can't find
    anything ,more, i can't reproduce the error! The memory usage is
    about 20Mb and does not go up .
    However it is pretty simple to see the following behavior:
    [1] Restart the server (to have a clear picture) and wait a little for
    memory usage to stabilize.
    [2] In the application dir. touch .reload or one of the classes:
    The memory usage goes up by another 50Mb (huge amount of mem. taking
    into account the fact that it used only 20Mb under any load befor).
    Do this another time and another 20Mb gone etc..
    The JProfiler marks the memory used by classes . And it can be
    clearly seen the GC can't release most of it.
    I AM sure this is not the application that takes all the memory.
    Another hint : after making the server to reload application i can see
    that the number of threads ON EVERY RELOAD is going up by ~10-20
    threads .The # of threads goes lower over time but not the mem usage.
    My system:
    Sparc Solaris 9 ,Java 1.4.2_04-b05, Sun ONE Web Server 6.1SP5
    Evgeny

    my guess is that - because of '.reload' , web container tries to
    recompile all the classes that you use within your web application and
    hence the memory growth is spiking up.What do you mean by "tries to recompile"?The classes in
    Web-inf are already compiled! And i have only ~5 jsp's .
    (the most part of the applic. is a complicated business logic)
    If you are talking about reloading them ,yes,that's the purpose of .reload,
    isn't it? :).But it seems that container uses the memory for it's own
    classes: the usage of memory for my classes don't really grow
    that much (if at all) after reload (according to profiler)
    Also the real problem is that the memory usage grows to much for
    too long (neither seen it going down) and thus ends with OutOfMemory.
    if you are seeing the memory growth to be flat in stress environment,
    then I am not sure that why do you think that there is a memory leak ?There is no memory leak in stress environment.
    There is memory leak while reloading the application.
    It is a memory hog for sure (~20-30Mb for every reload).
    Memory leak?It seems that way because i can't see memory usage go
    down and after a lot of reloads OutOfMemory is thrown.
    also, what is jvm heap that you use ? did you try jvm tune options like -
    XX:+AggressiveHeap ?256Mb.I can set it bigger ,but how do i know that it will not just delay
    the problem ?
    Thanks for response.
    Evgeny

  • Memory Leak with JVM.

    Hi,
    I am getting a jvm Memory Leak when i try to load and parse XMLs. The version of JDK is 1.4.1_05. Has anyone faced this problem?
    Any pointers to this will be very helpful.
    Thanks
    Rajdeep

    There is at least one bug associated with xml (although not because of it) which usually makes an appearance in long running applications.
    http://forum.java.sun.com/thread.jsp?forum=31&thread=351925
    If this is an internal application you could conceivably replace the StringBuffer class yourself to fix this.

  • Memory leak puzzle

    Hello guys,
    I'm having a very, very difficult time debugging this memory leak on my server. I'm pretty sure it's related to berkeley DB XML, bu I just couldn't prove this in numbers.
    My server: Debian GNU/Linux 2.4.27-2-386 #1 Wed Aug 17 09:33:35 UTC 2005 i686 GNU/Linux, 512 MB of RAM, Pentium 4-class processor.
    Here's the behaviour. I start Tomcat 5.5.15, the application is loaded, current memory status:
    delegaciainterativa:~# free -m
    total used free shared buffers cached
    Mem: 440 346 94 0 14 282
    -/+ buffers/cache: 49 391
    Swap: 909 4 905
    So, I've got 94 MBs of free memory. Now, here's this JSP I'm running:
    <%@ page language="java" %>
    <%@ page session="true" %>
    <%@ page import="br.gov.al.delegaciainterativa.admin.*"%>
    <%@ page import="br.gov.al.delegaciainterativa.controles.*"%>
    <%@ page import="br.gov.al.delegaciainterativa.admin.areas.*"%>
    <%@ page import="br.gov.al.delegaciainterativa.controles.BdbXmlAmbiente"%>
    <%@ page import="java.util.*"%>
    <%@ page import="javax.servlet.RequestDispatcher"%>
    <%@ page import="com.sleepycat.dbxml.XmlContainer"%>
    <%@ page import="com.sleepycat.dbxml.XmlDocument"%>
    <%@ page import="com.sleepycat.dbxml.XmlException"%>
    <%@ page import="com.sleepycat.dbxml.XmlIndexDeclaration"%>
    <%@ page import="com.sleepycat.dbxml.XmlIndexSpecification"%>
    <%@ page import="com.sleepycat.dbxml.XmlQueryContext"%>
    <%@ page import="com.sleepycat.dbxml.XmlQueryExpression"%>
    <%@ page import="com.sleepycat.dbxml.XmlResults"%>
    <%@ page import="com.sleepycat.dbxml.XmlTransaction"%>
    <%@ page import="com.sleepycat.dbxml.XmlUpdateContext"%>
    <%@ page import="com.sleepycat.dbxml.XmlValue"%>
    <%@ page import="com.sleepycat.dbxml.XmlUpdateContext"%>
    <%@ page import="com.sleepycat.dbxml.XmlQueryContext"%>
    <%@ include file="config.jsp"%>
    <%!
         final String _grupoPagina = "visualizaLogsUsuario";
    %>
    <font face="verdana" size="1">
    <%
              HttpSession sessao = request.getSession(true);
              BdbXmlAmbiente bdbxmlAmbiente = new BdbXmlAmbiente();
              XmlContainer container = bdbxmlAmbiente.abrirContainer(Config.getNomeContainerBO());
              String fullquery = "";
              fullquery = "for $i in collection('"+ Config.getNomeContainerBO() +"')/BO \n";     
              fullquery += "where $i/cadastro/fim/data/date >= '2006-00-00' \n";
              fullquery += "return $i";
    ArrayList docs = new ArrayList();
    XmlResults results = null;
         XmlValue value = null;
         XmlDocument document = null;
    try {
         XmlQueryContext context = bdbxmlAmbiente.getEnvironmentInit().getManager().createQueryContext();
         context.setEvaluationType(XmlQueryContext.Eager);
         XmlQueryExpression xqe = bdbxmlAmbiente.getEnvironmentInit().getManager().prepare(fullquery, context);
         results = xqe.execute(context);
                   out.println("<p>fez busca, deletando...</p>");
    while (results.hasNext()) {
         value = results.next();
    document = value.asDocument();
         document.fetchAllData();
         out.println(document.getName() + "<br>");
    //out.println("<p>total: " + results.size() + "</p>");
    } catch (Throwable e) {
         out.println(e);
    e.printStackTrace();
    } finally {
                   results.delete();
    %>
    This basically loads about 1600 small documents (~5KB) from the container, and guess how memory is now:
    delegaciainterativa:~# free -m
    total used free shared buffers cached
    Mem: 440 429 11 0 14 282
    -/+ buffers/cache: 132 308
    Swap: 909 4 905
    That's about 83Mbs consumed!! And if I perform other searches like this, this keeps eating up more and more memory, then swapping and getting slow... and sometimes crashing Tomcat.
    Here's the big mistery: the memory NEVER GETS RELEASED. Even calling delete(), as I did explicitily, it doesnt release the memory. It keeps increasing as searches are performed.
    Now, let's go to the profiler. I've installed JProfiler and run it on this server, and here're the results: http://freeunix.com.br/All_Objects.html
    Even more puzzling, I havent got any impressive amount of memory consumption.
    So, what can I do to figure this out? The only way to release memory is to restart the server once and a while, which far from ideal.
    I'd really would appreciate any help about this, since I'm on production with this server.
    cheers,
    -- Breno Jacinto

    Hello George,
        I tried this:
    <%
              HttpSession sessao = request.getSession(true);
              BdbXmlAmbiente bdbxmlAmbiente = new BdbXmlAmbiente();
              XmlContainer container = bdbxmlAmbiente.abrirContainer(Config.getNomeContainerBO());
              String fullquery = "";
              fullquery = "for $i in collection('"+ Config.getNomeContainerBO() +"')/BO \n";     
              fullquery += "where $i/cadastro/fim/data/date >= '2006-00-00' \n";
              fullquery += "return $i";
            ArrayList docs = new ArrayList();
            XmlResults results = null;
             XmlValue value = null;
             XmlDocument document = null;
            try {
                 XmlQueryContext context = bdbxmlAmbiente.getEnvironmentInit().getManager().createQueryContext();
                 context.setEvaluationType(XmlQueryContext.Eager);
                 XmlQueryExpression xqe = bdbxmlAmbiente.getEnvironmentInit().getManager().prepare(fullquery, context);
                 results = xqe.execute(context);
                   out.println("<p>fez busca, deletando...</p>");
                while (results.hasNext()) {
                     value = results.next();
                    document = value.asDocument();
                        document.fetchAllData();
                        out.println(document.getName() + "<br>");
                        value.delete();
                        document.delete();
                //out.println("<p>total: " + results.size() + "</p>");
                   context.delete();
                   xqe.delete();
                   results.delete();
            } catch (Throwable e) {
                 out.println(e);
                e.printStackTrace();
    %>
         Don't you think that it's too much to consume ~80 MBs of RAM, in a search that returns ~1600 5 KB  documents? And worse, this amount is never released.
         I'm wondering if there's any configuration issue here? Such as JVM's Heap size, or BDBXML Environment Initialization?
    thanks,
    -- Breno

  • Is this a memory leak issue ?

    We are using Jdev10g + BC4J + Struts + JSP to build our enterprise application,
    but when the application running some days in our Application Server(RedHat AS3-86, with 4GB RAM), the memory consumed is serious ! we doubt and worry
    about maybe our application suffer the memory leak problem, so we want to know have the command to find out whether our application caused the memory leak
    issue and which program is the major murderer for memory.
    In EM console , the memory utilization chart have big memory consumed in "other" legend ? the "other" legend is mean what ? I cannot find the consumer process in system level through ps command ? it seems disapear ! but after I reboot the server , the "other" legend is clear !

    The second scenario is, as we perform some deployment activity on 10g, the memory usage chart shows a sharp consumption of memory about 1.5GB .the loss memory almost be display in "other" legend chart !
    Please give us some advice , thanks in advance

  • 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

  • Possible Memory Leak in WLS6.1-SP2

    Hello,
    I need your help in getting to the bottom of a memory issue we are facing.
    We are running EJB based applications on Web Logic Server (WLS) 6.1 SP2 on Solaris
    8 servers using 1.3.1_03 JDK. There are several applications running, but lets
    use one of them as example.
    I am using the following JDK parameters:
    -XX:NewSize=96m -XX:MaxNewSize=96m -Xms384m -Xmx384m -XX:SurvivorRatio=2
    The memory values on Solaris, before the application is started, are as follows:
    Real memory = 4096M, Free memory = 2415M, Swap in use = 1059M, Swap free = 2322M
    When I start the applications, I can see the memory foot print for this application
    at around 540 Meg. Since JVM pre-allocates heap space, I expect this number to
    remain constant as the application is stressed. But this does not happen, and
    it puzzles me. I see the memory footprint of application go up, and that makes
    me believe that is a memory leak somewhere. Since heap space remains below the
    selected limit (384M), and the application does not over-run heap, it makes me
    believe that the memory leak is not happening in application code; rather it is
    Web Logic Server that is leaking memory.
    As the application runs, the memory footprint increase from 540M to almost 900M,
    to the point the system is left with very low free swap space, and the application
    (not necessarily this particular one) starts throwing OutOfMemoryError.
    At this point, it becomes impossible to recover and the only way out is to bounce
    WLS.
    Does it sound like a memory leak issue to you ? Do you agree that it look like
    a WLS memory leak?
    If anybody had similar experience, please help me with your advice. I would be
    very interested in knowing how you diagnosed the problem and what solution did
    you apply.
    Thanks,
    Asad Faizi

    The native OCI driver is not allocating out of the Java heap, but rather
    from the OS (or the c rtl) so the Java heap parameters do not affect it. I
    don't know if it is a problem that you see or just normal behavior.
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Asad Faizi" <[email protected]> wrote in message
    news:[email protected]...
    >
    Cameron,
    We are using Oracle-8.1.7r3 driver. Can you give me some more informationas to
    why do you suspect Oracle JDBC driver? Have you had similar experience ?How did
    you diagnose this and what did you do to fix it?
    Thanks,
    Asad Faizi
    "Cameron Purdy" <[email protected]> wrote:
    Probably a JDBC driver (Oracle OCI?).
    Peace,
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com/coherence.jsp
    Tangosol Coherence: Clustered Replicated Cache for Weblogic
    "Asad Faizi" <[email protected]> wrote in message
    news:[email protected]...
    Hello,
    I need your help in getting to the bottom of a memory issue we arefacing.
    We are running EJB based applications on Web Logic Server (WLS) 6.1SP2 on
    Solaris
    8 servers using 1.3.1_03 JDK. There are several applications running,but
    lets
    use one of them as example.
    I am using the following JDK parameters:
    -XX:NewSize=96m -XX:MaxNewSize=96m -Xms384m -Xmx384m -XX:SurvivorRatio=2
    The memory values on Solaris, before the application is started, areas
    follows:
    Real memory = 4096M, Free memory = 2415M, Swap in use = 1059M, Swapfree =
    2322M
    When I start the applications, I can see the memory foot print forthis
    application
    at around 540 Meg. Since JVM pre-allocates heap space, I expect thisnumber to
    remain constant as the application is stressed. But this does not
    happen,
    and
    it puzzles me. I see the memory footprint of application go up, andthat
    makes
    me believe that is a memory leak somewhere. Since heap space remainsbelow
    the
    selected limit (384M), and the application does not over-run heap,it
    makes me
    believe that the memory leak is not happening in application code;rather
    it is
    Web Logic Server that is leaking memory.
    As the application runs, the memory footprint increase from 540M toalmost
    900M,
    to the point the system is left with very low free swap space, andthe
    application
    (not necessarily this particular one) starts throwing OutOfMemoryError.
    At this point, it becomes impossible to recover and the only way outis to
    bounce
    WLS.
    Does it sound like a memory leak issue to you ? Do you agree that itlook
    like
    a WLS memory leak?
    If anybody had similar experience, please help me with your advice.I
    would be
    very interested in knowing how you diagnosed the problem and what
    solution
    did
    you apply.
    Thanks,
    Asad Faizi

  • Memory leaks in my application

    Hi all,
    My application is running well but the memory used by my application is not properly released. If my application is kept running for a day ..then the total system memory is used and server got struckup. can any body help me how can trace for the memory leaks in my application.
    Thanks in advance.
    Santhosh.gandhe

    What version of JDK are you running?
    The Java compiler leaks memory each time a class is compiled. Web applications containing hundreds of JSP files may as a result trigger out of memory errors once a significant number of pages have been accessed. The memory can only be freed by stopping Tomcat and then restarting it.
    The JSP command line compiler (JSPC) can also be used to recompile the JSPs.
    Note: This issue has been fixed in Sun JDK 1.4.x.

  • Your Advice:Is this memory leak?

    Hi All, I am supporting this Java Appplication and get the below errors all the time. I would like to seek your assitance as to how they could be resolved. The application stops 3-4 times a month and when the weblogic server is restarted it is fineBelow are the Service Packs whihc are being used.
    Sun ONE Web Server     6.0
    Sun ONE Directory Server     5.1 Service Pack 2
    BEA WebLogic Server     7 Service Pack 2
    Oracle Database Server     9i Service Pack 2 (9.0.2)
    Lookint at errors below is has been suggested it may be a memory leak problems that have been encountered.
    How do I make sure it is memory leak problems?? What can I do to overcome these???
    Regards,
    Raj
    Errors:
    ####<24/07/2006 14:16:15> <Error> <T3Services> <osun8300.optus.com.au> <efserver> <ExecuteThread: '14' for queue: 'default'>
    <kernel identity> <> <000000> <24667597 [ExecuteThread: '14' for queue: 'default'] ERROR au.com.whitewolf.mvc.NavigationManag
    er 203.13.136.243 - An exception occured whilst Navigating:Input/output error: java.io.IOException: Broken pipe
    >
    javax.servlet.ServletException: Input/output error: java.io.IOException: Broken pipe
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:269)
    at au.com.whitewolf.mvc.NavigationManager.navigate(NavigationManager.java:319)
    at au.com.whitewolf.mvc.NavigationManager.navigate(NavigationManager.java:159)
    at au.com.whitewolf.mvc.DispatcherServlet.doPost(DispatcherServlet.java:303)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5445)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3105)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2588)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
    javax.servlet.jsp.JspException: Broken pipe
    at org.apache.struts.taglib.template.InsertTag.doEndTag(InsertTag.java:149)
    at jsp_servlet._customer.__mainMenu._jspService(__mainMenu.java:341)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.RequestDispatcherImpl$ForwardAction.run(RequestDispatcherImpl.java:342)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:252)
    at weblogic.servlet.jsp.PageContextImpl.forward(PageContextImpl.java:132)
    at jsp_servlet.__index._jspService(__index.java:355)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.RequestDispatcherImpl$ForwardAction.run(RequestDispatcherImpl.java:342)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:252)
    at au.com.optus.eFulfilment.Presentation.LogIn.servlet.LogInServlet.doPost(LogInServlet.java:262)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.RequestDispatcherImpl$ForwardAction.run(RequestDispatcherImpl.java:342)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
    at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:252)
    at au.com.whitewolf.validation.servlet.ValidationServlet.doPost(ValidationServlet.java:771)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1058)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:401)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5445)
    at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3105)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2588)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
    ####<24/07/2006 14:31:57> <Error> <HTTP> <osun8300.optus.com.au> <efserver> <ExecuteThread: '20' for queue: 'default'> <kerne
    l identity> <> <101017> <[ServletContext(id=7458299,name=efulfilment,context-path=/eFulfilment)] Root cause of ServletExcepti
    on>
    j
    ####<24/07/2006 14:55:06> <Error> <T3Services> <osun8300.optus.com.au> <efserver> <ExecuteThread: '27' for queue: 'default'>
    <kernel identity> <> <000000> <26998982 [ExecuteThread: '27' for queue: 'default'] ERROR au.com.whitewolf.mvc.NavigationManag
    er 203.13.136.243 - An exception occured whilst Navigating:Input/output error: java.io.I
    ####<26/07/2006 11:30:02> <Error> <T3Services> <osun8300.optus.com.au> <efserver> <ExecuteThread: '56' for queue: 'default'>
    <kernel identity> <> <000000> <17803589 [ExecuteThread: '56' for queue: 'default'] ERROR au.com.whitewolf.mvc.DispatcherServl
    et 10.32.144.121 - Mismatched bean property-Action Response Command:companyInfoSessionElement in bean:au.com.optus.eFulfilmen
    t.Presentation.mvc.orgUnitLoad.OrgUnitLoadResponseBean
    >
    ####<26/07/2006 11:30:02> <Error> <T3Services> <osun8300.optus.com.au> <efserver> <ExecuteThread: '56' for queue: 'default'>
    <kernel identity> <> <000000> <17803591 [ExecuteThread: '56' for queue: 'default'] ERROR au.com.whitewolf.mvc.DispatcherServl
    et 10.32.144.121 - Ignoring unexpected error updating context for:au.com.optus.eFulfilment.Presentation.mvc.orgUnitLoad.OrgUn
    itLoadResponseBean.companyInfoSessionElement:Bad command property registered:companyInfoSessionElement
    >
    ####<26/07/2006 11:30:08> <Error> <T3Services> <osun8300.optus.com.au> <efserver> <ExecuteThread: '56' for queue: 'default'>
    <kernel identity> <> <000000> <17809275 [ExecuteThread: '56' for queue: 'default'] ERROR au.com.whitewolf.mvc.DispatcherServl
    et 10.32.144.149 - Mismatched bean property-Action Response Command:companyInfoSessionElement in bean:au.com.optus.eFulfilmen
    t.Presentation.mvc.orgUnitLoad.OrgUnitLoadResponseBean
    >
    ####<26/07/2006 11:30:08> <Error> <T3Services> <osun8300.optus.com.au> <efserver> <ExecuteThread: '56' for queue: 'default'>
    <kernel identity> <> <000000> <17809279 [ExecuteThread: '56' for queue: 'default'] ERROR au.com.whitewolf.mvc.DispatcherServl
    et 10.32.144.149 - Ignoring unexpected error updating context for:au.com.optus.eFulfilment.Presentation.mvc.orgUnitLoad.OrgUn
    itLoadResponseBean.companyInfoSessionElement:Bad command property registered:companyInfoSessionElement
    >
    ####<26/07/2006 11:38:20> <Error> <HTTP> <osun8300.optus.com.au> <efserver> <ExecuteThread: '53' for queue: 'default'> <kerne
    l identity> <> <101017> <[ServletContext(id=990935,name=efulfilment,context-path=/eFulfilment)] Root cause of ServletExceptio
    n>
    Errors:

    Isn't this better asked on a BEA Weblogic help forum?
    Glen

  • Whether our application caused the memory leak

    whether have the command to find out whether our application caused the memory leak !
    We are using Jdev10g + JHeadstart(Release 9.0.5.1, BC4J + Struts + JSP) to build our enterprise application,
    but when the application running some days in our Application Server(RedHat AMD64, with 8GB RAM), the memory consumed was growth seriously in production environment (one OC4J instance will caused almost 2G memory ulilization after running 2 days) that is caused us to restart the instance each day ! we doubt and worry
    about maybe our application suffer the memory leak problem, so we want to know have the command to find out whether our application caused the memory leak
    issue and which program is the major murderer for memory.

    Ting,
    Unfortunately there is no 'command' that will show you the location of a memory leak. First I would scrutinizing your code for any obvious 'leaks'. Then, you should obtain some statistics about the usage of your system. One important aspect is how long a HttpSession usually lives. If you have thousands of users that stay online the entire day and never 'time out', and if you have users on the system 24 hours a day, then the sheer number of HttpSessions might be a problem.
    JHeadstart 9.0.x tends to have rather 'heavy' session objects. This can easily be solved by adding some actions to clear up DataObjects and DataObjectSets of previous 'Groups' when entering a new Group. A good place would be between the 'DynamicActionRouter' and the 'ActionRouters'. Just before entering the 'EmployeeActionRouter', you could remove all DataObjects and DataObjectSets that might be left on the Session by actions of the other ActionRouters.
    Also it would be interesting to see if the garbage collector can do its thing when the system is less busy. For instance, if your application has a smaller load during the weekend, what is the memory usage on Sunday at midnight compared to, say, Friday at noon. Has the memory load dropped consistently with the decreased number of online users, or does too much memory stay allocated? If so, then there's more going on than just HttpSession objects.
    If all this does not lead to a solution, I suggest using a profiling tool such as OptimizeIt to investigate the memory usage of the application in detail.
    Kind regards,
    Peter Ebell
    JHeadstart Team

Maybe you are looking for

  • XSS SCA import in CMS error: failed to build

    We are getting error when trying to build XSS Track in NWDI. There are 2 brocken DC for development track. Here is the error message that we get: Development Component Build (2008-11-28 22:04:10)   Component name: mss/mol   Component vendor: sap.com

  • Dlookup to take pdf to the correct folder

    hi , this is the code that this forum helped me with  but i need some help to modify it  this code looks at a table for the directory to put my reports in and all is good  but i really need is that this code looks as the table and selects the directo

  • Error 48?!?!?

    I keep trying to update my iphone 4.2.6 to 5.0.1 and I keep getting error 48 while it's backing up.  So I've googled how to fix this problem and everyone says to delete the ispw file and I've done that.  Still getting error 48!  I've restarted my com

  • Need to Create Service Orders from Hand Held Devices

    Hi, Could any one please provide me the Function Module for creation of service orders from Hand Held devices? Thanks and Regards, Gopinath Addepalli.

  • Use Adobe Education License to write a book

    May I use the Adobe Educational License to write a book about the software itself? ie. a book How to Use Adobe Flash Effectively in Classroom etc. Thanks. Mizie