Outofmemory error

I get the following error sometimes .
Oracle XSQL Servlet Page Processor 1.0.2.0 (Production)
XSQL-017: Unexpected Error Occurred
java.lang.OutOfMemoryError:
at oracle.jdbc.ttc7.TTIoer.init(TTIoer.java:100)
at oracle.jdbc.ttc7.Oclose.init(Oclose.java:75)
at oracle.jdbc.ttc7.TTC7Protocol.close(TTC7Protocol.java:530)
at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:595)
at oracle.xml.sql.dataset.OracleXMLDataSetExtJdbc.close(OracleXMLDataSetExtJdbc.java:359)
at oracle.xml.sql.dataset.OracleXMLDataSetExtJdbc.cursorClose(OracleXMLDataSetExtJdbc.java:838)
at oracle.xml.sql.core.OracleXMLConvert.convertCursorObject(OracleXMLConvert.java:2144)
at oracle.xml.sql.core.OracleXMLConvert.convertObject(OracleXMLConvert.java:2023)
at oracle.xml.sql.core.OracleXMLConvert.convertCursorObject(OracleXMLConvert.java:2138)
at oracle.xml.sql.core.OracleXMLConvert.convertObject(OracleXMLConvert.java:2023)
at oracle.xml.sql.core.OracleXMLConvert.convertCursorObject(OracleXMLConvert.java:2138)
at oracle.xml.sql.core.OracleXMLConvert.convertObject(OracleXMLConvert.java:2023)
at oracle.xml.sql.core.OracleXMLConvert.convertRow(OracleXMLConvert.java:1925)
at oracle.xml.sql.core.OracleXMLConvert.getXML(OracleXMLConvert.java:1126)
at oracle.xml.sql.core.OracleXMLConvert.To_XML(OracleXMLConvert.java:922)
at oracle.xml.sql.query.OracleXMLQuery.getXMLDOM(OracleXMLQuery.java:322)
at oracle.xml.sql.query.OracleXMLQuery.getXMLDOM(OracleXMLQuery.java:269)
at oracle.xml.xsql.actions.XSQLQueryHandler.handleAction(XSQLQueryHandler.java:239)
at oracle.xml.xsql.XSQLDocHandler.getDocument(XSQLDocHandler.java:129)
at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java:140)
at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at com.unify.ewave.servletexec.ServletExec.CallServletService(ServletExec.java)
at com.unify.ewave.servletexec.ServletExec.processServletRequest(ServletExec.java)
at com.unify.ewave.servletexec.ServletExec.processServletAlias(ServletExec.java)
at com.unify.ewave.servletexec.ServletExec.ProcessRequest(ServletExec.java)
at com.unify.ewave.servletexec.ServletExec.ProcessRequest(ServletExec.java)
please advise as to what is the problem
I have also increased the output buffer size
of servletexe to 2 GB
thanks
latha

I am using ServletExec 3.0 and i have set the output buffer there
Current JITC: symcjit
Operating System: Windows NT 4.0 on x86
Selected Java VM: Sun Classic Sun HotSpot IBMMicrosoft
JITC: Enabled Disabled
Minimum Heap Size: 16384 K Bytes
Maximum Heap Size: 2638400 K Bytes
Verbose GC: Enabled Disabled
Verbose: Enabled Disabled
Class GC: Enabled Disabled
Security Manager:
System Output:
System Error:
and i am retrieving 30 fields and about 50 rows
Please help
latha

Similar Messages

  • OutOfMemory error in java.awt.image.DataBufferInt. init

    We have an applet application that performs Print Preview of the images in the canvas. The images are like a network of entities (it has pictures of the entities involve (let's say Person) and how it links to other entities). We are using IE to launch the applet.
    We set min heap space to 128MB, JVM max heap space to 256MB, java plugin max heap space to 256MB using the Control Panel > Java.
    When the canvas width is about 54860 and height is 1644 and perform Print Preview, it thows an OutOfMemoryError in java.awt.image.DataBufferInt.<int>, hence, the Print Preview page is not shown. The complete stack trace (and logs) is as follows:
    Width: 54860 H: 1644
    Max heap: 254 # using Runtime.getRuntime().maxMemory()
    javaplugin.maxHeapSize: 256M # using System.getProperties("javaplugin.maxHeapSize")
    n page x n page : 1x1
    Exception in thread "AWT-EventQueue-2" java.lang.OutOfMemoryError: Java heap space
         at java.awt.image.DataBufferInt.<init>(Unknown Source)
         at java.awt.image.Raster.createPackedRaster(Unknown Source)
         at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
         at java.awt.image.BufferedImage.<init>(Unknown Source)
         at com.azeus.gdi.chart.GDIChart.preparePreview(GDIChart.java:731)
         at com.azeus.gdi.chart.GDIChart.getPreview(GDIChart.java:893)
         at com.azeus.gdi.ui.GDIUserInterface.printPreviewOp(GDIUserInterface.java:1526)
         at com.azeus.gdi.ui.GDIUserInterface$21.actionPerformed(GDIUserInterface.java:1438)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Drilling down the cause of the problem. The OutOfMemory occurred in the constructor of DataBufferInt when it tried to create an int array:
    public DataBufferInt(int size) {
    super(STABLE, TYPE_INT, size);
    data = new int[size]; # this part produce out of memory error when size = width X height
    bankdata = new int[1][];
    bankdata[0] = data;
    The OutOfMemory error occurred when size is width * height (54860 X 1644) which is 90,189,840 bytes (~86MB).
    I can replicate the OutOfMemory error when initiating an int array using a test class when it uses the default max heap space but if I increase the heap space to 256MB, it cannot be replicated in the test class.
    Using a smaller width and height with product not exceeding 64MB, the applet can perform Print Preview successfully.
    Given this, I think the java applet is not using the value assigned in javaplugin.maxHeapSize to set the max heap space, hence, it still uses the default max heap size and throws OutOfMemory in int array when size exceeds the default max heap space which is 64MB.
    For additional information, below is some of the java properties (when press S in java applet console):
    browser = sun.plugin
    browser.vendor = Sun Microsystems, Inc.
    browser.version = 1.1
    java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
    java.awt.printerjob = sun.awt.windows.WPrinterJob
    java.class.path = C:\PROGRA~1\Java\jre6\classes
    java.class.version = 50.0
    java.class.version.applet = true
    java.runtime.name = Java(TM) SE Runtime Environment
    java.runtime.version = 1.6.0_17-b04
    java.specification.version = 1.6
    java.vendor.applet = true
    java.version = 1.6.0_17
    java.version.applet = true
    javaplugin.maxHeapSpace = 256M
    javaplugin.nodotversion = 160_17
    javaplugin.version = 1.6.0_17
    javaplugin.vm.options = -Xms128M -Djavaplugin.maxHeapSpace=256M -Xmx256m -Xms128M
    javawebstart.version = javaws-1.6.0_17
    Kindly advise if this is a bug in JRE or wrong setting. If wrong setting, please advise on the proper way to set the heap space to prevent OutOfMemory in initializing int array.
    Thanks a lot.
    Edited by: rei_xanther on Jun 28, 2010 12:01 AM
    Edited by: rei_xanther on Jun 28, 2010 12:37 AM

    rei_xanther wrote:
    ..But the maximum value of the int data type is 2,147,483,647. That is the maximum positive integer value that can be stored in (the 4 bytes of) a signed int, but..
    ..The value that I passed in the int array size is only 90,189,840...its only connection with RAM is that each int requires 4 bytes of memory to hold it.
    new int[size] -- size is 90,189,840Sure. So the number of bytes required to hold those 90,189,840 ints is 360,759,360.
    I assumed that one element in the int array is 1 byte. ..Your assumption is wrong. How could it be possible to store 32 bits (4 bytes) in 8 bits (1 byte)? (a)
    a) Short of some clever compression algorithm applied to the data.

  • OutOfMemory error while executing sql query

    Hello!
    My program gets multiple datas from database in every ten minutes, and stores them in memory for hundreds of users, requesting datas via web-interface simoultaneously.
    I dont have access to change database structures, write stored procedures, etc, just read from db.
    There is a table in database with lot of million rows, and sometimes when I try to execute a SELECT on this table it takes minutes to get back the result.
    To avoid waiting for database server for a long time, I set querytimeout to 30 seconds.
    If the server throws back the execution with Query Timed out Exception, I want to 'forget' this data, and 0 value is acceptable because of fast run is more important. So I put the boolean broken variable to check if there is any problem with db server.
    The size of the used memory is about 150Mb if things going well, but I set the max heap to 512 MB, just in case anything happens.
    I'm logging all threads stacktrace, and free/used/allocated memory size in every 5 seconds.(threadwatching.log) 2.appendix
    Sometimes, not in every case (I dont know what is this depends on), when I get the next phase of refreshing cached datas (you can see it below), the process reaches the fiorst checkpoint (signed in code below), starts to execute the sql query, and never reaches the second checkpoint , but used memory growing 50-60 Mb-os in every 5 seconds, as I can see in threadwatching.log until it reaches the max memory and throws OutOfMemory error: java heap space.
    I'm using DbConnectionBroker for connection pooling, SQLCommandBean for handling Statements, PreparedStatements, etc, and jTDS jdbc connector.
    SQLCommandBean closes statements, resultsets, so these objects doesnt stays open.
    I cant figured out what causes the memory leak, if someone have an idea, please help me.
    1. Part of the cached data refreshing (DataFactory.createPCVPPMforSiemens()):
            PCVElement element = new PCVElement(m, ProcessControlView.PPM);
            String s = DateTime.getDate(interval.getStartDate());
            boolean broken=false;
            int value = 0;
            for (int j = 0; j < 48; j++) {
                try {
                    if (!broken) {
                        d1 = DateTime.getDate(new Date(start + ((j + 1) * 600000)));
                        sqlBean = new SQLCommandBean();
                        conn = broker.getConnection();
                        sqlBean.setConnection(conn);
                        sqlBean.setQueryTimeOut(30);
                        System.out.println(DateTime.getDate(new Date())+" "+m.getName()+"   "+j);// first checkpoint
                        value = SiemensWorks.getPCVPPM(sqlBean, statId, s, d1);
                        System.out.println(DateTime.getDate(new Date())+" "+m.getName()+"   "+j);// second checkpoint
                    } else value=0;
                } catch (Exception ex) {
                    System.out.println("ERROR: DataFactory.createPCVPPMforSiemens 1 :" + ex.getMessage());
                    ex.printStackTrace();
                    value = 0;
                    broken=true;
                } finally {
                    try {
                        broker.freeConnection(conn);
                    } catch (Exception ex) {}
                element.getAvgValues()[j] = value;
            }2. SiemensWorks.getPCVPPM()
        public static int getPCVPPM(SQLCommandBean sqlBean,int statID,String start,String end)
                throws SQLException, UnsupportedTypeException, NoSuchColumnException {
            sqlBean.setSqlValue(SiemensSQL.PCV_PPM);
            Vector values=new Vector();
            values.add(new StringValue(statID+""));
            values.add(new StringValue(start));
            values.add(new StringValue(end));
            sqlBean.setValues(values);
            Vector rows=sqlBean.executeQuery();
            if (rows==null || rows.size()==0) return 0;
            Row row=(Row)rows.firstElement();
            try {
                float ret=Float.parseFloat(row.getString(1));
                if (ret<=0) ret=0;
                return Math.round(ret);
            } catch (Exception ex) {
                return 0;
        }3. Part of Threadwatching.log
    2006-10-13 16:46:56 Name: SMT Refreshing Threads
    2006-10-13 16:46:56 Thread count: 4
    2006-10-13 16:46:56 Active count: 4
    2006-10-13 16:46:56 Active group count: 0
    2006-10-13 16:46:56 Daemon: false
    2006-10-13 16:46:56 Priority: 5
    2006-10-13 16:46:57 Free memory: 192,228,944 bytes
    2006-10-13 16:46:57 Max memory: 332,988,416 bytes
    2006-10-13 16:46:57 Memory in use: 140,759,472 bytes
    2006-10-13 16:46:57 ---------------------------------
    2006-10-13 16:46:57 0. Name: CachedLayerTimer
    2006-10-13 16:46:57 0. Id: 19
    2006-10-13 16:46:57 0. Priority: 5
    2006-10-13 16:46:57 0. Parent: SMT Refreshing Threads
    2006-10-13 16:46:57 0. State: RUNNABLE
    2006-10-13 16:46:57 0. Alive: true
    2006-10-13 16:46:57 java.io.FileOutputStream.close0(Native Method)
    2006-10-13 16:46:57 java.io.FileOutputStream.close(Unknown Source)
    2006-10-13 16:46:57 sun.nio.cs.StreamEncoder$CharsetSE.implClose(Unknown Source)
    2006-10-13 16:46:57 sun.nio.cs.StreamEncoder.close(Unknown Source)
    2006-10-13 16:46:57 java.io.OutputStreamWriter.close(Unknown Source)
    2006-10-13 16:46:57 xcompany.smtmonitor.chart.ChartCreator.createChart(ChartCreator.java:663)
    2006-10-13 16:46:57 xcompany.smtmonitor.chart.ChartCreator.create(ChartCreator.java:441)
    2006-10-13 16:46:57 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:463)
    2006-10-13 16:46:57 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:46:57 java.util.TimerThread.run(Unknown Source)
    Software runs well until I get the DataFactory.createPCVPPMforSiemens function in my code ->
    2006-10-13 16:47:01 Name: SMT Refreshing Threads
    2006-10-13 16:47:01 Thread count: 4
    2006-10-13 16:47:01 Active count: 4
    2006-10-13 16:47:01 Active group count: 0
    2006-10-13 16:47:01 Daemon: false
    2006-10-13 16:47:01 Priority: 5
    2006-10-13 16:47:02 Free memory: 189,253,304 bytes
    2006-10-13 16:47:02 Max memory: 332,988,416 bytes
    2006-10-13 16:47:02 Memory in use: 143,735,112 bytes
    2006-10-13 16:47:02 ---------------------------------
    2006-10-13 16:47:02 0. Name: CachedLayerTimer
    2006-10-13 16:47:02 0. Id: 19
    2006-10-13 16:47:02 0. Priority: 5
    2006-10-13 16:47:02 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:02 0. State: RUNNABLE
    2006-10-13 16:47:02 0. Alive: true
    2006-10-13 16:47:02 java.util.LinkedList$ListItr.previous(Unknown Source)
    2006-10-13 16:47:02 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:174)
    2006-10-13 16:47:02 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:02 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:02 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:02 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:02 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:02 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:02 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:02 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:02 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:02 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:02 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:06 Name: SMT Refreshing Threads
    2006-10-13 16:47:06 Thread count: 4
    2006-10-13 16:47:06 Active count: 4
    2006-10-13 16:47:06 Active group count: 0
    2006-10-13 16:47:06 Daemon: false
    2006-10-13 16:47:06 Priority: 5
    2006-10-13 16:47:08 Free memory: 127,428,192 bytes
    2006-10-13 16:47:08 Max memory: 332,988,416 bytes
    2006-10-13 16:47:08 Memory in use: 205,560,224 bytes
    2006-10-13 16:47:08 ---------------------------------
    2006-10-13 16:47:08 0. Name: CachedLayerTimer
    2006-10-13 16:47:08 0. Id: 19
    2006-10-13 16:47:08 0. Priority: 5
    2006-10-13 16:47:08 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:08 0. State: RUNNABLE
    2006-10-13 16:47:08 0. Alive: true
    2006-10-13 16:47:08 java.util.LinkedList$ListItr.previous(Unknown Source)
    2006-10-13 16:47:08 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:174)
    2006-10-13 16:47:08 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:08 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:08 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:08 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:08 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:08 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:08 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:08 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:08 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:08 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:08 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:12 Name: SMT Refreshing Threads
    2006-10-13 16:47:12 Thread count: 4
    2006-10-13 16:47:12 Active count: 4
    2006-10-13 16:47:12 Active group count: 0
    2006-10-13 16:47:12 Daemon: false
    2006-10-13 16:47:12 Priority: 5
    2006-10-13 16:47:15 Free memory: 66,760,208 bytes
    2006-10-13 16:47:15 Max memory: 332,988,416 bytes
    2006-10-13 16:47:15 Memory in use: 266,228,208 bytes
    2006-10-13 16:47:15 ---------------------------------
    2006-10-13 16:47:15 0. Name: CachedLayerTimer
    2006-10-13 16:47:15 0. Id: 19
    2006-10-13 16:47:15 0. Priority: 5
    2006-10-13 16:47:15 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:15 0. State: RUNNABLE
    2006-10-13 16:47:15 0. Alive: true
    2006-10-13 16:47:15 java.util.LinkedList.addBefore(Unknown Source)
    2006-10-13 16:47:15 java.util.LinkedList.access$300(Unknown Source)
    2006-10-13 16:47:15 java.util.LinkedList$ListItr.add(Unknown Source)
    2006-10-13 16:47:15 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:175)
    2006-10-13 16:47:15 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:15 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:15 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:15 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:15 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:15 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:15 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:15 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:15 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:15 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:15 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:17 Name: SMT Refreshing Threads
    2006-10-13 16:47:17 Thread count: 4
    2006-10-13 16:47:17 Active count: 4
    2006-10-13 16:47:17 Active group count: 0
    2006-10-13 16:47:17 Daemon: false
    2006-10-13 16:47:17 Priority: 5
    2006-10-13 16:47:20 Free memory: 23,232,496 bytes
    2006-10-13 16:47:20 Max memory: 332,988,416 bytes
    2006-10-13 16:47:20 Memory in use: 309,755,920 bytes
    2006-10-13 16:47:20 ---------------------------------
    2006-10-13 16:47:20 0. Name: CachedLayerTimer
    2006-10-13 16:47:20 0. Id: 19
    2006-10-13 16:47:20 0. Priority: 5
    2006-10-13 16:47:20 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:20 0. State: RUNNABLE
    2006-10-13 16:47:20 0. Alive: true
    2006-10-13 16:47:20 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:171)
    2006-10-13 16:47:20 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:20 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:20 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:20 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:20 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:20 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:20 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:20 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:20 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:20 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:20 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:23 Name: SMT Refreshing Threads
    2006-10-13 16:47:23 Thread count: 4
    2006-10-13 16:47:23 Active count: 4
    2006-10-13 16:47:23 Active group count: 0
    2006-10-13 16:47:23 Daemon: false
    2006-10-13 16:47:23 Priority: 5
    2006-10-13 16:47:26 Free memory: 4,907,336 bytes
    2006-10-13 16:47:26 Max memory: 332,988,416 bytes
    2006-10-13 16:47:26 Memory in use: 328,083,768 bytes
    2006-10-13 16:47:26 ---------------------------------
    2006-10-13 16:47:26 0. Name: CachedLayerTimer
    2006-10-13 16:47:26 0. Id: 19
    2006-10-13 16:47:26 0. Priority: 5
    2006-10-13 16:47:26 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:26 0. State: RUNNABLE
    2006-10-13 16:47:26 0. Alive: true
    2006-10-13 16:47:26 java.util.LinkedList.addBefore(Unknown Source)
    2006-10-13 16:47:26 java.util.LinkedList.access$300(Unknown Source)
    2006-10-13 16:47:26 java.util.LinkedList$ListItr.add(Unknown Source)
    2006-10-13 16:47:26 net.sourceforge.jtds.util.TimerThread.setTimer(TimerThread.java:175)
    2006-10-13 16:47:26 net.sourceforge.jtds.jdbc.TdsCore.wait(TdsCore.java:3734)
    2006-10-13 16:47:26 net.sourceforge.jtds.jdbc.TdsCore.executeSQL(TdsCore.java:997)
    2006-10-13 16:47:26 net.sourceforge.jtds.jdbc.JtdsStatement.executeSQLQuery(JtdsStatement.java:320)
    2006-10-13 16:47:26 net.sourceforge.jtds.jdbc.JtdsPreparedStatement.executeQuery(JtdsPreparedStatement.java:667)
    2006-10-13 16:47:26 xcompany.database.sql.SQLCommandBean.executeQuery(SQLCommandBean.java:91)
    2006-10-13 16:47:26 xcompany.smtmonitor.data.SiemensWorks.getPCVPPM(SiemensWorks.java:409)
    2006-10-13 16:47:26 xcompany.smtmonitor.data.DataFactory.createPCVPPMforSiemens(DataFactory.java:6103)
    2006-10-13 16:47:26 xcompany.smtmonitor.data.DataFactory.refreshProcessControlView(DataFactory.java:5791)
    2006-10-13 16:47:26 xcompany.smtmonitor.CachedLayerRefreshenerTask.run(CachedLayerRefreshenerTask.java:514)
    2006-10-13 16:47:26 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:26 java.util.TimerThread.run(Unknown Source)
    2006-10-13 16:47:35 Name: SMT Refreshing Threads
    2006-10-13 16:47:37 Thread count: 4
    2006-10-13 16:47:38 Active count: 4
    2006-10-13 16:47:38 Active group count: 0
    2006-10-13 16:47:38 Daemon: false
    2006-10-13 16:47:38 Priority: 5
    2006-10-13 16:47:42 Free memory: 35,316,120 bytes
    2006-10-13 16:47:42 Max memory: 332,988,416 bytes
    2006-10-13 16:47:42 Memory in use: 297,672,296 bytes
    2006-10-13 16:47:42 ---------------------------------
    2006-10-13 16:47:42 0. Name: CachedLayerTimer
    2006-10-13 16:47:42 0. Id: 19
    2006-10-13 16:47:42 0. Priority: 5
    2006-10-13 16:47:42 0. Parent: SMT Refreshing Threads
    2006-10-13 16:47:42 0. State: TIMED_WAITING
    2006-10-13 16:47:42 0. Alive: true
    2006-10-13 16:47:42 java.lang.Object.wait(Native Method)
    2006-10-13 16:47:42 java.util.TimerThread.mainLoop(Unknown Source)
    2006-10-13 16:47:42 java.util.TimerThread.run(Unknown Source)
    4. Tomcat default logging file:
    2006-10-13 16:47:36 ERROR CachedLayerRefreshenerTask: external error: Java heap space
    5. DbConnectionBroker (connection pooling) logging file:
    Handing out connection 1 --> 10/13/2006 04:47:01 PM
    Handing out connection 0 --> 10/13/2006 04:47:01 PM
    Handing out connection 1 --> 10/13/2006 04:47:01 PM
    Handing out connection 0 --> 10/13/2006 04:47:02 PM
    Warning. Connection 0 in use for 3141 ms
    Warning. Connection 0 in use for 24891 ms
    ----> Error: Could not free connection!!!
    I would appreciate for any help.

    What does your query bring back from this table?This is the query:
    SELECT case sum(c.picked) when 0 then 0 else
    ((sum(c.picked)-(sum(c.picked)-(sum(c.vacuum)+sum(c.id
    ent))))*cast((1000000/cast(sum(c.picked) as float))
    as bigint)) end as PPM
    FROM sip_comp c
    LEFT JOIN sip_pcb pc ON pc.id=c.pcbid
    LEFT JOIN sip_period p on p.id=pc.periodid
    WHERE p.stationid=? AND pc.time BETWEEN ? AND ?Has anybody who knows SQL tried EXPLAIN PLAN to optimize this table? You're joining on a table with a million rows and you're wondering why the performance is poor?
    What is the index situation with these tables?
    .> When I execute it from query manager, it takes from 1
    to 60 secs depend on servers availability. So how will that be any different for JDBC and Java?
    ..> You're right. Thats why I am here.
    What I mean by that is we can't read minds, either. You need to get some hard data to tell you where the bottleneck is. Asking at a forum won't help.
    But tell me, if the java process enters to this query
    execution, and doesnt quit until OOM thrown, how can
    be the problem in caching?I was guessing about caching, because I didn't know what the query was.
    You expect a lot.
    .> No.
    Then how do you ever expect to solve this?
    I tried YourKit Profiler at home, where I'm
    developing software, but this OOM never thrown here,
    even if I have the same database size.Then you aren't replicating the problem. You have to run it on the system that has the problem if you're going to solve it.
    YourKit isn't an industry leader. How well do you know how to use it?
    It just happened at the company where the system
    runs, and I cannot run this profiler there because
    the PC where my tomcat runs dramatically slowed.You have to run something to figure out what the problem is. What about Log4J, some trace logging statements and a batch job to harvest the log?
    Bottom line: you've got to be a scientist and get some real data. We can theorize all we want here, but that won't get you to a solution.
    %

  • Java.lang.OutOfMemory error while retrieving data from a large table

    Hi,
    i am trying to fetch data using "executeQuery()" into a ResultSet from the database. But since the data in that table is large. i am recieving "java.lang.OutOfMemory" Error. So, to resolve that, i have used "setMaxRows()" for my statement object. This resolved the error but i don't recieve the entire data. If i call "executeQuery()" again, i recieve the same data. I don't even know a filtering criterion where by i can filter the data for each "executeQuery()"..
    How can i resolve this problem
    Thanx in advance
    --Chaitanya                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Either use some criteria you develop related to one of the keys on the table or use some sort of record limiting method.
    Note the method of limiting will vary related to the database you are using. You will have to look at the documentation.
    For example I am told this will work in MySQL to get 200 records starting at record 100.
    SELECT * FROM myTable ORDER BY whatever ASC LIMIT 100,200
    Because you are running out of memroy I assume the table is large,
    I am not sure what the impact of the above will have on performance because if in the above if the order by is not based on an index at the server level all the records will be selected and sorted before the records are limited.
    I would make sure you have an appropriate index.
    If you use the advanced search over the user forums using "resultset paging" and possibility the database you are using you should be able to get some ideas.
    I hope this makes sense to you.
    rykk

  • Bad Performance/OutOfMemory Error in CMP Entity Bean with Large DB

    Hello:
    I have an CMP Entity deployed on WLS 7.0
    The entity bean maps to a table that has 97,480 records.
    It has a finder: findAll() -- SELECT OBJECT(e) FROM Equipment e
    I have a JSP client that invokes the findALL()
    The performance is very poor ~ 150 seconds just to perform the findAll() - (Benchmark
    from within the JSP code)
    If more than one simultaneous call is made then I get outOfMemory Error.
    WLS is started with max memory of 512MB
    EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>
    (without max-beans-in-cache directive the performance is worse)
    Is there any documentation available to help us in deploying CMP Entity Beans
    with very large number of records (instances) ?
    Any help is greatly appreciated.
    Regards
    Rajan

    Hi
    You should use a Select Method, it does support cursors.
    Or a Home Select Method combination.
    Regards
    Thomas
    WLS is started with max memory of 512MB
    EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>>
    (without max-beans-in-cache directive the performance is worse)>
    Is there any documentation available to help us in deploying CMP
    Entity Beans with very large number of records (instances) ? Any help
    is greatly appreciated.>
    Regards>
    Rajan>
    >
    "Rajan Jena" <[email protected]> schrieb im Newsbeitrag
    news:3dadd7d1$[email protected]..
    >
    Hello:
    I have an CMP Entity deployed on WLS 7.0
    The entity bean maps to a table that has 97,480 records.
    It has a finder: findAll() -- SELECT OBJECT(e) FROM Equipment e
    I have a JSP client that invokes the findALL()
    The performance is very poor ~ 150 seconds just to perform the findAll() -(Benchmark
    from within the JSP code)
    If more than one simultaneous call is made then I get outOfMemory Error.
    WLS is started with max memory of 512MB
    EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>
    (without max-beans-in-cache directive the performance is worse)
    Is there any documentation available to help us in deploying CMP EntityBeans
    with very large number of records (instances) ?
    Any help is greatly appreciated.
    Regards
    Rajan

  • OutOfMemory error when trying to display large tables

    We use JDeveloper 10.1.3. Our project uses ADF Faces + EJB3 Session Facade + TopLink.
    We have a large table (over 100K rows) which we try to show to the user via an ADF Read-only Table. We build the page by dragging the facade findAllXXX method's result onto the page and choosing "ADF Read-only Table".
    The problem is that during execution we get an OutOfMemory error. The Facade method attempts to extract the whole result set and to transfer it to a List. But the result set is simply too large. There's not enough memory.
    Initially, I was under the impression that the table iterator would be running queries that automatically fetch just a chunk of the db table data at a time. Sadly, this is not the case. Apparently, all the data gets fetched. And then the iterator simply iterates through a List in memory. This is not what we needed.
    So, I'd like to ask: is there a way for us to show a very large database table inside an ADF Table? And when the user clicks on "Next", to have the iterator automatically execute queries against the database and fetch the next chunk of data, if necessary?
    If that is not possible with ADF components, it looks like we'll have to either write our own component or simply use the old code that we have which supports paging for huge tables by simply running new queries whenever necessary. Alternatively, each time the user clicks on "Next" or "Previous", we might have to intercept the event and manually send range information to a facade method which would then fetch the appropriate data from the database. I don't know how easy or difficult that would be to implement.
    Naturally, I'd prefer to have that functionality available in ADF Faces. I hope there's a way to do this. But I'm still a novice and I would appreciate any advice.

    Hi Shay,
    We do use search pages and we do give the users the opportunity to specify search criteria.
    The trouble comes when the search criteria are not specific enough and the result set is huge. Transferring the whole result set into memory will be disastrous, especially for servers used by hundreds of users simultaneously. So, we'll have to limit the number of rows fetched at a time. We should do this either by setting the Maximum Rows option for the TopLink query (or using rownum<=XXX inside the SQL), or through using a data provider that supports paging.
    I don't like the first approach very much because I don't have a good recipe for calculating the optimum number of Maximum Rows for each query. By specifying some average number of, say, 500 rows, I risk fetching too many rows at once and I also risk filling the TopLink cache with objects that are not necessary. I can use methods like query.dontMaintainCache() but in my case this is a workaround, not a solution.
    I would prefer fetching relatively small chunks of data at a time and not limiting the user to a certain number of maximum rows. Furthermore, this way I won't fetch large amounts of data at the very beginning and I won't be forced to turn off the caching for the query.
    Regarding the "ADF Developer's Guide", I read there that "To create a table using a data control, you must bind to a method on the data control that returns a collection. JDeveloper allows you to do this declaratively by dragging and dropping a collection from the Data Control Palette."
    So, it looks like I'll have to implement a collection which, in turn, implements the paging functionality that I need. Is the TopLink object you are referring to some type of collection? I know that I can specify a collection class that TopLink should use for queries through the query.useCollectionClass(...) method. But if TopLink doesn't provide the collection I need, I will have to write that collection myself. I still haven't found the section in the TopLink documentation that says what types of Collections are natively provided by TopLink. I can see other collections like oracle.toplink.indirection.IndirectList, for example. But I have not found a specific discussion on large result sets with the exception of Streams and Cursors and I feel uneasy about maintaining cursors between client requests.
    And I completely agree with you about reading the docs first and doing the programming afterwards. Whenever time permits, I always do that. I have already read the "ADF Developer's Guide" with the exception of chapters 20 and 21. And I switched to the "TopLink Developer's Guide" because it seems that we must focus on the model. Unfortunately, because of the circumstances, I've spent a lot of time reading and not enough time practicing what I read. So, my knowledge is kind of shaky at the moment and perhaps I'm not seeing things that are obvious to you. That's why I tried using this forum -- to ask the experts for advice on the best method for implementing paging. And I'm thankful to everyone who replied to my post so far.

  • Ejbc outofmemory error in weblogic 8.1 sp2 when compiling cmp entity beans

    I have a set of entity beans which compiled [ejbc step]fine under weblogic7.0 sp4. But when i try to to the same thing under weblogic 8.1 i get an outofmemory error. Any pointers

    I am using 81 sp4

  • SNMP trap on OutOfMemory Error Log record

    I would like to implement SNMP trap on OutOfMemory Error Log record.
    In theory SNMP LogFilter with Severity Level "Error" and Message Substring "OutOfMemory" should do the trick.
    In reality it does not work (doh)(see explanations below), I wonder if someone managed to make it work.
    Log entry has following format:
    ----------- entry begin ----------
    ####<Nov 12, 2003 3:09:23 PM EST> <Error> <HTTP> <ustrwd2021> <local> <ExecuteThread: '14' for queue: 'default'> <> <> <101020> <[WebAppServletContext(747136,logs2,/logs2)] Servlet failed with Exception>
    java.lang.OutOfMemoryError
         <<no stack trace available>>
    ------------ entry end ------------
    Notice that java.lang.... is NOT part of the log record, yep it seems that exception stack trace is not part of log record! Thus filter could be applied only to "<[WebAppServletContext(747136,logs2,/logs2)] Servlet failed with Exception>" string, which is really useless.
    Here is fragment of trap data (i had to remove Message Substring in order to get Error trap to work)
    1.3.6.1.4.1.140.625.100.50: trapLogMessage: [WebAppServletContext(747136,logs2,/logs2)] Servlet failed with Exception

    Andriy,
    I dont think you could do much here, since Outofmemory is not part of
    log record SNMP agent cannot filter on this. I would be curious to hear
    if anyone got it to work using SNMP.
    sorry,
    -satya
    Andriy Potapov wrote:
    I would like to implement SNMP trap on OutOfMemory Error Log record.
    In theory SNMP LogFilter with Severity Level "Error" and Message Substring "OutOfMemory" should do the trick.
    In reality it does not work (doh)(see explanations below), I wonder if someone managed to make it work.
    Log entry has following format:
    ----------- entry begin ----------
    ####<Nov 12, 2003 3:09:23 PM EST> <Error> <HTTP> <ustrwd2021> <local> <ExecuteThread: '14' for queue: 'default'> <> <> <101020> <[WebAppServletContext(747136,logs2,/logs2)] Servlet failed with Exception>
    java.lang.OutOfMemoryError
         <<no stack trace available>>
    ------------ entry end ------------
    Notice that java.lang.... is NOT part of the log record, yep it seems that exception stack trace is not part of log record! Thus filter could be applied only to "<[WebAppServletContext(747136,logs2,/logs2)] Servlet failed with Exception>" string, which is really useless.
    Here is fragment of trap data (i had to remove Message Substring in order to get Error trap to work)
    1.3.6.1.4.1.140.625.100.50: trapLogMessage: [WebAppServletContext(747136,logs2,/logs2)] Servlet failed with Exception

  • OutofMemory Error in Business connector

    Hi,
    I am facing OutofMemory Error while installing a package(3MB) on Business connector 4.0.1 system on windows 2000 and I see none of the services are loaded.
    I have set the maximum ram to 1024M in the server.sh and also installed latest SR7. But still the error faced.
    Please help if someone know what could be the solution.

    Hi,
    you should take care that you sweep regularly the SAP-transaction-log. There is a transaction 'sweepTransaction' which can be scheduled on a regurlar basis to get rid of old transactions.
    Another possible reason is that your service is consuming vast amounts of main memory, this could happen with very large objects, i.e. extremely big xml-files.
    Refer this thread from an external website which has answers to your query.
    http://www.wmusers.com/wmusers/messages/117/48840.shtml?1106329484
    Please reward points if it helps
    Thanks
    Vikranth

  • OutOfMemory error in Weblogic jvm even when enough heap is still available

    Hi Everyone,
    We get a strange OutOfMemory error that happens only once in our Weblogic server in production environment.The Server immediately recovers and there is no issue as far as the application functionality is concerned.
    This is the exact error as seen in weblogic console.log file :
    caused by: java.lang.OutOfMemoryError: Java heap space
    I enabled the verbose gc logging too with the jvm parameter "-XX:+PrintHeapAtGC".Am copying the gc.log file excerpt when we got the Out of Memory issue in console.log.
    gc.log when error was seen in console.log:
    172047.050: [GC {Heap before gc invocations=28392:
    par new generation   total 49088K, used 49024K [0xb8000000, 0xbb000000, 0xbb000000)
      eden space 49024K, 100% used [0xb8000000, 0xbafe0000, 0xbafe0000)
      from space 64K,   0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
      to   space 64K,   0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
    concurrent mark-sweep generation total 737280K, used 364191K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166556K [0xe8000000, 0xf8000000, 0xf8000000)
    172047.050: [ParNew: 49024K->0K(49088K), 0.1014386 secs] 413215K->382087K(786368K)Heap after gc invocations=28393:
    par new generation total 49088K, used 0K [0xb8000000, 0xbb000000, 0xbb000000)
    eden space 49024K, 0% used [0xb8000000, 0xb8000000, 0xbafe0000)
    from space 64K, 0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
    to space 64K, 0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
    concurrent mark-sweep generation total 737280K, used 382087K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166556K [0xe8000000, 0xf8000000, 0xf8000000)
    , 0.1021810 secs]
    172055.735: [GC {Heap before gc invocations=28393:
    par new generation   total 49088K, used 49008K [0xb8000000, 0xbb000000, 0xbb000000)
      eden space 49024K,  99% used [0xb8000000, 0xbafdc128, 0xbafe0000)
      from space 64K,   0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
      to   space 64K,   0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
    concurrent mark-sweep generation total 737280K, used 382087K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166616K [0xe8000000, 0xf8000000, 0xf8000000)
    172055.735: [ParNew: 49008K->0K(49088K), 0.0536844 secs] 431095K->387656K(786368K)Heap after gc invocations=28394:
    par new generation total 49088K, used 0K [0xb8000000, 0xbb000000, 0xbb000000)
    eden space 49024K, 0% used [0xb8000000, 0xb8000000, 0xbafe0000)
    from space 64K, 0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
    to space 64K, 0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
    concurrent mark-sweep generation total 737280K, used 387656K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166616K [0xe8000000, 0xf8000000, 0xf8000000)
    , 0.0544288 secs]
    172059.106: [Full GC {Heap before gc invocations=28394:
    par new generation   total 49088K, used 22668K [0xb8000000, 0xbb000000, 0xbb000000)
      eden space 49024K,  46% used [0xb8000000, 0xb9623158, 0xbafe0000)
      from space 64K,   0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
      to   space 64K,   0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
    concurrent mark-sweep generation total 737280K, used 387656K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166616K [0xe8000000, 0xf8000000, 0xf8000000)
    172059.106: [CMS: 387656K->335512K(737280K), 6.1797673 secs] 410325K->335512K(786368K), [CMS Perm : 166616K->166119K(262144K)]Heap after gc invocations=28395:
    par new generation total 49088K, used 0K [0xb8000000, 0xbb000000, 0xbb000000)
    eden space 49024K, 0% used [0xb8000000, 0xb8000000, 0xbafe0000)
    from space 64K, 0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
    to space 64K, 0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
    concurrent mark-sweep generation total 737280K, used 335512K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166119K [0xe8000000, 0xf8000000, 0xf8000000)
    , 6.1804623 secs]
    172073.913: [GC {Heap before gc invocations=28395:
    par new generation   total 49088K, used 49024K [0xb8000000, 0xbb000000, 0xbb000000)
      eden space 49024K, 100% used [0xb8000000, 0xbafe0000, 0xbafe0000)
      from space 64K,   0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
      to   space 64K,   0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
    concurrent mark-sweep generation total 737280K, used 335512K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166146K [0xe8000000, 0xf8000000, 0xf8000000)
    172073.913: [ParNew: 49024K->0K(49088K), 0.0616737 secs] 384536K->341716K(786368K)Heap after gc invocations=28396:
    par new generation total 49088K, used 0K [0xb8000000, 0xbb000000, 0xbb000000)
    eden space 49024K, 0% used [0xb8000000, 0xb8000000, 0xbafe0000)
    from space 64K, 0% used [0xbafe0000, 0xbafe0000, 0xbaff0000)
    to space 64K, 0% used [0xbaff0000, 0xbaff0000, 0xbb000000)
    concurrent mark-sweep generation total 737280K, used 341716K [0xbb000000, 0xe8000000, 0xe8000000)
    concurrent-mark-sweep perm gen total 262144K, used 166146K [0xe8000000, 0xf8000000, 0xf8000000)
    , 0.0623851 secs]
    I read at some forums that Heap fragmentation could be the reason when you get the OutOfMemory error?Also the rate with which GC is running if it consumes more than 98% of time and releases less than 2% of heap,this error could be thrown.
    Could any of the above be a cause for this?We dont have the flexibilty of increasing the Xmx anymore.
    We are using a Concurrent Mark Sweep collector as can be seen from script below.
    Here are the jvm parameters am using in Server start script:
    JAVA_HOME/bin/java -server -Xms768m -Xmx768m -XX:MaxPermSize=256m -XX:MaxNewSize=64m -Xbootclasspath/a:$BOOTCLASSPATH -classpath $CLASSPATH -Dbea.home=$BEA_HOME -Dweblogic.Domain=$DOMAIN_NAME -Dweblogic.Name=$SERVER_NAME -Djava.security.auth.login.config=../properties/login.config -Dcom.sun.management.jmxremote.port=7003 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -XX:+UsePerfData -verbose:gc -XX:+PrintGCDetails -XX:+PrintHeapAtGC -XX:+PrintGCTimeStamps -Xloggc:../log/gc.log -Djava.security.policy==$WL_HOME/lib/weblogic.policy -Dweblogic.ProductionModeEnabled=true -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:+CMSPermGenSweepingEnabled -Dweblogic.management.discover=false -XX:-TraceClassUnloading -Dweblogic.management.server=scc-prd-admin.XXX.com:7001 weblogic.Server
    We are using jdk1.5.0_06 version of java with Weblogic.
    Could someone please help resolve this issue?Any thoughts?

    Are you using RMI? Have you adjusted sun.rmi.dgc.server.gcInterval and sun.rmi.dgc.client.gcInterval from their default values for calling System.gc()? I gather (from the format of your logs) that you are running an older JVM, where the default RMI GC intervals were 60000 milliseconds (1 minute). In later JVM's, the default RMI GC interval was increased to 1 hour. See the [JavaTM RMI Release Notes for JDK 6|http://java.sun.com/javase/6/docs/technotes/guides/rmi/relnotes.html] for some details on this.
    Otherwise you might be using some third party code that calls System.gc() periodically. A later JVM will show "(System)" in the full GC output for collections that were caused by a call to System.gc(). You can effectively disable that behavior with the -XX:+DisableExplicitGC command line option, though that might have bad effects on your application if the third party code needed those full collections. But it would be diagnostic.

  • OutOfMemory Error when deploying application in WL10

    I've got an application that I am able to deploy from the WL9 console without hickups. But when I try to deploy it through WL10 console, it hangs and eventualy throws an OutOfMemory error. I've tried doubling the memory I allocate to WL but this does nothing. I can manually edit the config.xml to deploy the application and it works but I am unable to expand or view it from the console without getting the same OutOfMemory error. Any ideas?

    I ran a profiler on wl when getting the OutOfMemory error and the class weblogic.j2ee.descriptor.wl.WeblogicEjbJarBeanDConfig seems to be the culprit. Does WL10 load EJBs differently into memory than WL9?
    Also, I added the -verbosegc option to my vm args and it looks like the eden space isnt getting released. Not sure what that is supposed to tell me...
    1318.268: [Full GC {Heap before gc invocations=166:
    def new generation   total 56576K, used 56576K [0xccc00000, 0xd04e0000, 0xd04e0000)
      eden space 54912K, 100% used [0xccc00000, 0xd01a0000, 0xd01a0000)
      from space 1664K, 100% used [0xd01a0000, 0xd0340000, 0xd0340000)
      to   space 1664K,   0% used [0xd0340000, 0xd0340000, 0xd04e0000)
    tenured generation   total 466048K, used 466048K [0xd04e0000, 0xecc00000, 0xecc00000)
       the space 466048K, 100% used [0xd04e0000, 0xecc00000, 0xecc00000, 0xecc00000)
    compacting perm gen  total 83456K, used 83263K [0xecc00000, 0xf1d80000, 0xf8c00000)
       the space 83456K,  99% used [0xecc00000, 0xf1d4fdf0, 0xf1d4fe00, 0xf1d80000)
    No shared spaces configured.
    1318.268: [Tenured: 466048K->466048K(466048K), 6.4704001 secs] 522624K->513170K(522624K), [Perm : 83263K->83263K(83456K)]Heap after gc invocations=167:
    def new generation total 56576K, used 47122K [0xccc00000, 0xd04e0000, 0xd04e0000)
    eden space 54912K, 85% used [0xccc00000, 0xcfa04970, 0xd01a0000)
    from space 1664K, 0% used [0xd01a0000, 0xd01a0000, 0xd0340000)
    to space 1664K, 0% used [0xd0340000, 0xd0340000, 0xd04e0000)
    tenured generation total 466048K, used 466048K [0xd04e0000, 0xecc00000, 0xecc00000)
    the space 466048K, 100% used [0xd04e0000, 0xecc00000, 0xecc00000, 0xecc00000)
    compacting perm gen total 83456K, used 83263K [0xecc00000, 0xf1d80000, 0xf8c00000)
    the space 83456K, 99% used [0xecc00000, 0xf1d4fdf0, 0xf1d4fe00, 0xf1d80000)
    No shared spaces configured.
    Edited by kadire at 06/20/2008 7:41 AM

  • OutOfMemory Error in commit

    Greetings (Kodo3.4.1, JDK1.4, Oracle9i, Weblogic8.1)
    I have a case where an OutOfMemory Error occurs during
    PersistenceManager.currentTransaction().commit(). The problem is that,
    although commit() throws this Error, the database transaction appears to
    have already been committed.
    Do you have any advice regarding what I should do in this case? I am
    thinking that if OutOfMemory error occurs during commit, then it's possible
    that the Kodo caches may be out of sync with the database itself, therefore
    I should exit the JVM. The state of the records in the database should be
    ok. What do you reckon?
    Unfortunately there is no stack trace available, probably due to the Java
    shortcoming as detailed in
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4753347
    Cheers and thanks
    .droo.

    Thanks Henning - My thinking was that under most circumstances only the
    thread which received the OOM Error would need to die, assuming threads do
    not share any objects. This means that it would be ok to recover from an
    OOM which happens anywhere, EXCEPT: inside commit() after database has been
    updated but possibly while Kodo is updating it's internally shared objects -
    I don't know for sure as I don't have the source code and I don't know what
    it's doing when it dies. But... You may be right, even the threading
    system itself or the container may have cactus shared objects after an OOM.
    I will try to get hold of CR282897.
    Also thanks Denis, I am concerned with shared DataCache/QueryCaches but also
    was wanting to find out from Kodo what else I should be concerned about, as
    I don't know what commit is trying to do when it dies.
    In any case I have decided that if this OOM happens, I will disable the
    current application. Anyone who calls a SessionBean will be to go away
    because the server is experiencing difficulties, and it will try to notify
    the administrators. Hopefully I don't need to kill the VM because other
    applications may also be running in the same app server instance.
    Cheers and thanks
    .droo.
    On 21/9/06 7:49 AM, in article [email protected], "Henning
    Andersen" <Henning Andersen> wrote:
    Drew,
    Out Of Memory Errors normally cannot be recovered from. If the VM is near an
    out of memory error situation, the exception can be thrown in any thread, not
    just your kodo-comitting-thread. This exception can happen almost anywhere and
    nobody codes to handle it properly (for instance, most of java.util does not
    handle this properly, eg. TreeMap.put will leave treeset inconsistent if it
    cannot allocate an Entry). This means that if an out of memory error occurs
    you really should restart the vm.
    Only solution is to ensure that you do not get out of memory errors.
    I saw a similar problem (but not the same) on kodo 3.4.1, which had to do with
    creating many new objects and doing flushes in between, which would cause an
    internal list to grow in the DataCacheStoreManager. The fix for this is in
    CR282897, which I would recommend trying to get a hold of through support.On 20/9/06 8:51 PM, in article [email protected], "Denis
    Sukhoroslov" <[email protected]> wrote:
    Drew,
    if you concerned on cache sync with DB, you can easly clear it in case of
    OOM error:
    KodoPersistenceManager pm = ...// get PM
    DataCache dCache =
    pm.getConfiguration().getDataCacheManager().getDataCache();
    if (dCache != null) {
    dCache.clear();
    Denis.

  • Max-beans-in-cache, cachefullexception, outofmemory error

    Hi,
    I am trying to find the best way to find the numbers to be set in max-beans-in-cache
    for entity beans. I have a stateless session bean through which I access the
    entity beans. If I don't set any value for this property, in some query which
    will return 2500 records, I get a cachefullexception and if I increase it and
    set this property to say 5000, I get an outofmemory error.
    I am not sure how to decide what value should be used.
    Any help or suggestion would be greatly appreciated.
    We are using WLS 7.0 on NT machines in a cluster.
    Thanks,
    Jaideep

    If you need to perform some sort of bulk processing then perhaps you
    shouldn't be using
    entity beans at all.
    "Jaideep" <[email protected]> wrote in message
    news:[email protected]..
    >
    unfortunately, for a specific functionality in our application we need toget that
    many records. Now I am debating about changing the finder method so thatit returns
    only 500 records at one time and then I can call it multiple number oftimes.
    This may not be the best thing to do and we may take some kind of aperformance
    hit also but it may avoid the cachefull and outofmemory problems.
    Any suggestions or comments??
    Thanks,
    Jaideep
    Rob Woollen <[email protected]> wrote:
    First off, does what does the session bean or its caller do with the
    2500 or 5000 records? i.e. do you really need to select that many.
    Unfortunately there is no easy answer on how to set max-beans-in-cache.
    It depends a lot on your memory, application, and load.
    -- Rob
    Jaideep wrote:
    Hi,
    I am trying to find the best way to find the numbers to be set in
    max-beans-in-cache
    for entity beans. I have a stateless session bean through which Iaccess the
    entity beans. If I don't set any value for this property, in somequery which
    will return 2500 records, I get a cachefullexception and if I increaseit and
    set this property to say 5000, I get an outofmemory error.
    I am not sure how to decide what value should be used.
    Any help or suggestion would be greatly appreciated.
    We are using WLS 7.0 on NT machines in a cluster.
    Thanks,
    Jaideep
    Dimitri

  • JVM OutOfMemory Error

    We kept getting OutOfMemory error when we do the following:
    1. Run a large process
    2. Opening the audit trail for a large process in the BPEL console
    opmn\logs\OraBPEL~OC4J_BPEL~default_instal~1 log file:
    ===========================================
    JVMDG217: Dump Handler is Processing OutOfMemory - Please Wait.
    JVMDG315: JVM Requesting Heap dump file
    ...JVMDG318: Heap dump file written to /software/dev/oracle/oas/10.1.2/Applications/j2ee/home/heapdump1454236.1150914718.phd
    JVMDG303: JVM Requesting Java core file
    We had increased the Java Options have Xms2048m -Xmx2048m in the OC4J_BPEL server properties but still the same issue.
    Any suggestions?
    Thanks,
    Kenny

    Hi Marc,
    Thanks a Lot for the link and your quick response.
    We are facing OutOfMemory Issue in BPEL Server, portion of which i have pasted below.
    /opt01/app/ESIP/oracle/esip10gR2iAS/BPEL10gR2/iAS/j2ee/home/javacore3620902.1169
    180201.txt
    JVMDG274: Dump Handler has Processed OutOfMemory.
    <AF[64]: Insufficient space in Javaheap to satisfy allocation request>
    <AF[64]: completed in 40356 ms>
    A little background of our BPEL Process:-
    We have developed 4 BPEL Processes which have to run in parallel in production environment. During development we tested the processes with reasonable load and it worked fine.
    Now in the testing phase, during load testing we are getting OutOfMemory errors.The load is mentioned below:
    BPEL Process A-- Needs to process approx.2000 records for each run
    BPEL Process B-- Needs to process approx.1100 records for each run
    BPEL Process C-- Needs to process approx.600 records for each run
    BPEL Process D-- Needs to process approx.600 records for each run
    All these processes will be running in parallel in production environment.
    Due to the OutOfMemory Issue, we have an Open TAR with Oracle and per their suggestion we have upgraded our 32-bit IBM JDK to SR7 and have also applied Patch 5764987 and 5473163.
    But still the issue persists when we do load testing with the above mentioned load due to which we are severely delayed in our go-live.
    I wanted to confirm whether applying patch 4919956, mentioned in previous posts,will resolve the OutOfMemory issue and BPEL Server will be able to handle the load.
    Please let me know. It would be really great if anyone can advise on this as we are not able to go-live on BPEL.
    Thanks In Advance and please let me know if you need any additional details.
    Regards,
    Dibya

  • OutOfMemory Error due to unknown reasons

    HI ALL
    In my application iam reading an audio File nearly of size 55, 100MB etc and the graphical display
    of the audio file is shown.Recently we have included the feature of opening multiple audio files
    using JInternal Frames. Now when i try to open the above said size file OutOfMemory Error is thrown.
    Iam not able to find the reason as iam cooly able to open the file in single JFrame.
    I even tried to create only single JInternalFrame to open the 100MB file only but even then OutOfMemory Error is thrown
    The code for drawing the graph is:
    double y_new;
    byte[] sampleByte = new byte[1];
    DataOutputStream dos = new DataOutputStream(new BufferedOutputStream(new FileOutputStream("linesTop.txt"),1000));
    for( int j=0 ;j <length of file; j++)
    audioInputStream.read(sampleByte);
    y_new = (h1*sampleByte/256); //some calculation
    dos.writeDouble(y_new);
    dos.flush();
    dos.close();
    I thought to increase the Ram Size with command java -Xxm.... but i heard that the appl will become
    slow and has many draw backs so i want display the graph without increasing the heap size.
    Any Ideas /Suggesstions will be greatfully thanked.
    Wating for an idea...............
    kalpana

    Sorry - part of it is I'm not sure what logs to post. I've tried downgrading the kernel from 2.6.39 to 2.6.38 (seemed to start after the kernel upgrade), switching from Wicd to NetworkManager (couldn't even get NetworkManager to work) and looked through the various logs in /var/log, and none of them seem to have any errors - heck, the pm-suspend log claims that the suspends are a success. If I run pm-suspend in a terminal, it seems to do nothing and if I kill it it does a wonky suspend that pretty much renders the computer unuseable afterwards. (With a nice graphcal distortion.)
    Kernel logs don't report errors either, and the problems occur if I suspend from the XFCE menu as well.
    Also, my wireless card shows up as: Atheros Communications Inc. AR9285 Wireless Network Adapter. I also tried removing the logmein-hamachi daemon I installed recently.
    Last edited by GourdCaptain (2011-07-18 18:53:37)

  • Server0 restart with outOfMemory Error when using KM

    Hi,
    i am facing the following issue : when using the KM files and folder on my portal, the server0 restart with outOfMemory error.
    This is the log trace :
    FATAL: Caught OutOfMemoryError! Node will exit with exit code 666
    [EXCEPTION]
    java.lang.OutOfMemoryError
    My configuration is EP7, SP16 on windows 2k3 server, 6GB RAM, memory tuning :
    -     XX:MaxPermSize=512m
    -     XX:PermSize=512m
    -     XX:NewSize=341m for 2 GB heap size
    -     XX:MaxNewSize=341m for 2 GB heap size
    -     Heap Size : 2048
    -     Xmx2048m 
    -     Xms2048m
    -XX:+DisableExplicitGC
    JDK : 1.4.2_16-b05
    If someone could help....
    Thanks a lot.
    Fabien.

    Fabien,
    Please have a look at these SAP Notes : 723909 and 709140.
    Also, these threads might be handy.
    /message/3402754#3402754 [original link is broken]
    Re: FATAL: Caught OutOfMemoryError! Node will exit with exit code 666
    Cheers!
    Sandeep Tudumu

Maybe you are looking for

  • Turning on my MAC

    When I turn my IMAC on I get a white screen and a world globe flashing.....after around 5 miuntes my MAC logs in but it does not work perfectly. What can I do? Thks

  • BDC or LSMW program for AS91 transaction

    HI gurus, i need a BDC or lsmw program for tran:AS91 ie.create legacy data for two inter company data transfer.can anyone please help me bkz it's very urgent for me... i promise that if i get the ans i reward u.

  • The remote server returned an error

    hi Expert, New error I find now when trying to use dashboard application in B1. It sounds nice to have this new one since there is no info or solution in the SAP files or notes. The error message is the remote server returned an error : (407) proxy a

  • Is there any FM or BAPI to capture the action in CRMD_ORDER?

    Hi All, In CRMD_ORDER transaction, I need to know the action selected by the user like CREATE TRANSPORT OF COPIES, LOGON TO SYSTEM etc. Is there any FM or BAPI available to capture this action details? Thanks in advance.

  • HOW DO I FIX THIS ISSUE??

    I am trying to open a document on my Macbook Pro with Adobe Acrobat Pro from my teacher and it is a PDF file with videos within it. The videos are not loading and I do not know why! Can someone PLEASE PLEASE help me ASAP because I need to do my homew