Exception "Out of memory" sometimes..

Hello!
I have a web server (a java servlet - vm version 1.4.1_01_b01) that needs about 1024M of memory (i uses the option -Xmx1024M) working with tomcat (3.3.1) over a pentium IV with linux (red hat).
When the users uses my server the memory that the servlet needs increases until 1024M. When memory is over 1024, java automatically manages it and all works right.
I have changed my server to a powerful machine (2 intel xeon processor with option siblings, so 4 virtual processors) and linux system (vm is the same and tomcat is version 4.1). But now, when memory is over 1024, a "out of memory exception" is dispatched (i uses -Xmx1024M too) so i have to reset my server everyday!
Does someone something about a posible bug about this strange thing? will it be something about using 2 processors?
Thanks in advance!! :)
Natalia

Thanks for your response, but i think that it isn't the problem. I'm currently using Tomcat and i have checked that the request to my server are right managed by Tomcat 4: There are several threads in the differents processors. I think i haven't to cluster my servers, Tomcat distributes the request right.
Am i right?
Anyway, thanks!
Any idea else about the problem?
Thanks in adavance! :)
Natalia

Similar Messages

  • How to fixe exception out of memory ?

    Hello,i did a web application (asp.net/c#/crystal reports),i used more than 35 tableAdapter and when i'm trying report after some time i remark the memory increase more and more until i get Out Put memory Exception. how can i fix this problem ?
    please help me

    Hi ghilasdz,
    Thank you for posting in MSDN forum.
    Since this forum is to discuss: Visual Studio WPF/SL Designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System, and Visual Studio Editor.
    So I’m afraid that it is not the correct forum for this issue.
    As you said that the exception out of memory for the crystal reports, I suggest you can post this issue directly to the
    SAP Crystal Reports: http://scn.sap.com/community/crystal-reports/content?filterID=contentstatus%5bpublished%5d~objecttype~objecttype%5bthread%5d
    , you will get better support for this issue.
    In addition, I find a similar thread about the exception out of memory for the crystal reports on the
    SAP Crystal Reports, maybe you will get some useful message.
    http://scn.sap.com/thread/1888746
    Thanks for your understanding.
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Exception: Out of memory

    Hi all..
    Iam trying to get an image width * height = (2050 * 1200) into an pixel array.
    when i compile the program i get an runtime error:
    ""Exception in thread "main" java.lang.OutOfMemoryError""
    Iam not understanding where iam doing wrong -- can anyone of you please help me.
    thanx
    mark

    1.2 kB x 2 kB x 4 B per Pixel = almost 10 MB.
    Together with copies (image background, double buffering of GUI, your data) it might give an out-of-memory.
    You can run java with more memory. In the documentation Tools, java, flags:
    java -Xms100m -Xmx100m ...
    Improve your app:
    JComponent.setDoubleBuffered(false);

  • Out of memory Exception - Citrix

    In our organization we have about 200 Primavera users, we deliver the application via a farm of 3 load balanced Citrix servers. The database sits on Oracle 10g. We recently upgraded to P6.2.1. The upgrade was successful except that users sometimes recieve the following error:
    TCVirtualTable.LoadDelyedMemo: table=(Activity
    Resource Summary),sql=(SELECT spread_data FROM
    trsrcsum WHERE taskrsrc_sum_id= :taskrsrc_sum_id)
    , Exception=(out of memory)
    The error generally occurs when a Filter or Layout is applied.
    Further information:
    Behavior is temperamental, sometimes Filters / Layout load ok.
    Error cannot be reproduced by logging directly onto Citrix.
    Error cannot be reproduced by using stand alone client instead of Citrix.
    Does anyone have any experience of dealing with this / similar out of memory errors?
    Many thanks

    user12211922 wrote:
    In our organization we have about 200 Primavera users, we deliver the application via a farm of 3 load balanced Citrix servers. The database sits on Oracle 10g. We recently upgraded to P6.2.1. The upgrade was successful except that users sometimes recieve the following error:
    TCVirtualTable.LoadDelyedMemo: table=(Activity
    Resource Summary),sql=(SELECT spread_data FROM
    trsrcsum WHERE taskrsrc_sum_id= :taskrsrc_sum_id)
    , Exception=(out of memory) The table that error is referencing (TRSRCSUM) holds summary information about your activity resource assignments.
    It's quite possible there is something wrong with your summary data causing this error. What I would do is to delete all summary data (highlite all of your projects and then right click and select 'Delete project summaries...') and then resummarize them by highliting all projects and selecting 'Summarize Project'.
    Note: This could take a long time depending on how many projects you have and how large they are.
    See if this helps at all and post back.

  • I am getting an Out of memory error?

    when i try to convert excel file into database if file is too larg! in shows me exception out of memory How to remove that. my memory in 500MB
    Edited by: mnpw on Sep 25, 2008 7:28 AM

    tsith wrote:
    I'm sorry, I didn't realize you were asking for more specific assistance.
    Move your mouse over the text in my post that says "XMx and -XMs options" (anywhere on that text will do)
    click your left mouse button
    Read the discussion there
    apply that to your problem.
    If you still require assistance, feel free to post back with a more specific question (adding details such as how you execute your code would be helpful as well)
    Good Luck
    LeeSir,
    I am having problem with part in bolding
    Plase to be responding with teh codez for moving of mouse.
    Thank u

  • How to overcome a "System out of memory exception"?

    Hi,
    As i am running my program , I get (sometimes) an out of memory exception.
    I don't know exactly why because I am always doing the same thing so if I get this exception once It should always be so... (of course, as I am trying , no other program is running on my computer! ).
    anyway.
    I have 3 questions:
    1) Do you know how to eliminate this error ?
    (I don't mind if the time of execution is longer)
    2) I have Win XP, do you think that using a software to build ".exe" files can change the problem ? If so, have you heard about a simple 'one' (I downloaded JET Excelsior, but it seems rather complicated to parametrize)
    3) (last but not least) Can someone explain to me WHY there is this type of exception ( I would have thought that when "memory is full", then there is a swap, and the program doesn't stop !
    I know there is a lot of questions in one ! ( altough I tried to be short)
    Thanks

    In answer to your third question, the error occurs when
    the JVM runs out of memory, not the OS. Since the OS
    controls swapping the fact that the memory space
    assigned to the JVM is running low won't cause
    swapping to take place. The solution is either a) use
    less space by reducing what you have loaded at any
    given time or b) increase the amount of memory
    available to the JVM. You can user the -Xms, -Xmx and
    -Xss switches to increase the amount of memory
    available.
    Mark

  • Getting out of memory exception while loading images in web browser control one by one in windows phone 8 silverlight application?

    Hi, 
    I am developing a windows phone 8 silver light application . 
    In my app I am displaying images in web browser control one by one , those images are the web links , the problem is after displaying 2 to 3 images I am getting out of memory exception .
    I searched for this exception how to over come , everybody are saying memory profiling ,..etc but really I dont know how to release the memory and how to clear the memory .
    In some sites they are adding this
    <FunctionalCapabilities>
    <FunctionalCapability Name="ID_FUNCCAP_EXTEND_MEM"/>
    </FunctionalCapabilities>
    by doing this am I free from out of memory exception?
    Any help ,
    Thanks...
    Suresh.M

    string HtmlString = "<!DOCTYPE html><html><head><meta name='viewport' content='width=device-width,initial-scale=1.0, user-scalable=yes' /></head>";
    HtmlString = HtmlString + "<body>";
    HtmlString = HtmlString + "<img src=" + source +" />";
    HtmlString = HtmlString + "</body></html>";
    innerpagebrowser.NavigateToString(HtmlString);
    that image source is the web link for example www.sss.com/files/xxx/123.jpg .
    Note this link is not real this is sample and image is of size 2071X3097
    Suresh.M

  • Oracle BPM installed  Java out-of-memory exception

    Hi,
    I have installed the oracle BPM software in the server have the Ram capacity 8 GB,Could you please suggest some of the do's and don't's to avoid the Java out-of-memory exception which normally appearing on the console of weblogic server.
    My Server details,
    Windows 2008 R2 64 bit, RAM 8 GB,
    The required BPM s/w I installed from the link below,
    http://www.oracle.com/technetwork/middleware/bpm/downloads/index.html?ssSourceSiteId=ocomen
    Thanks in advance for your help.
    Regards,
    Shyam
    Edited by: user13821489 on 06-Feb-2011 22:45

    I had to increase JVM xmx/maxperm in the "set*Env.sh" scripts in the directory where you start WLS. In my dev environment, deploying BAM & BPM together with the Admin server, I finally allocated 4GB max. Jdev.conf is also better if you allocate > 1GB - mine is 1.4GB. I also watch process memory. Multiple re-deployments in my development environment seem to increase the memory, even if I remove process instances and undeploy first. I don't understand the internals very well so perhaps it is behaving correctly, but restarting WLS frees the unused memory that I expected gc to reclaim.

  • JWSDP1.2 JAXB Out of memory exception

    Hai,
    I am using JAXB in JWSDP1.2,while compiling with xjc it is giving out of memory error.I increased the size JVM memory to 1024m.
    It is giving when weinclude some imporrted schemas in the schema.is anyone have idea of this kind of problem. Is there any limit of innerclasees or included schemas.
    Thank you
    Sreen

    HI,
    THanks for the reply..AM using workshop IDE and have tried the "clean" option also but of no use..Is there any other alternative to get rid of this exception ???
    Regards

  • While Navigating back Recieved out of Memory Exception: WHY?

    i used JHEADSTART to built my Application. Major portion of the Application is Built now. when navigating back to the previous pages i have recieved this exception
    23-Jan 13:35:44 DEBUG (JhsNavigationHandlerImpl) -handleNavigation action=#{WizardPageListCreateNewEquip_Acc.getPreviousAction}, outcome=WizardCreateNewEquip_AccbillingProfile
    23-Jan 13:35:44 DEBUG (JhsNavigationHandlerImpl) -Executing checkRoles
    23-Jan 13:35:46 DEBUG (WizardProcessModel) -Wizard page has changed.
    Jan 23, 2008 1:36:21 PM oracle.adf.view.faces.bean.util.StateUtils$Saver restoreState
    SEVERE:
    java.lang.OutOfMemoryError: Java heap space
    23-Jan 13:36:29 DEBUG (JhsPageLifecycle) -Executing prepareModel, page=/pages/CreateNewEquip_AccbillingProfile.jspx, pagedef=CreateNewEquip_AccPageDef
    23-Jan 13:36:29 DEBUG (JhsNavigationHandlerImpl) -Executing checkRoles
    23-Jan 13:37:26 DEBUG (JhsPageLifecycle) -Executing prepareModel, page=/pages/ProductCatalouge.jspx, pagedef=ProductCatalougePageDef
    23-Jan 13:37:26 DEBUG (JhsNavigationHandlerImpl) -Executing checkRoles
    I am using Jdeveloper 10.1.3.3
    JHEADSTART Version : 10.1.3.1.26
    when i again clicked on the link to open the same page it gave same exception i.e. JAVA HEAP SPACE with out f memory.........

    Seems like your OC4J instance is running out of memory space.
    Try starting it with more memory allocated to it.
    (or if you only run into this after running your application inside JDeveloper several times - try to stop and restart the embedded OC4J).

  • URLStream.readBytes always throw out of memory exception (errorID=1000)

    When I try to load a file as 180MBytes by using URLStream.readBytes(). 
    In some PCs, it's OK.
    But in some PCs, there are always [out of memory] exception (errorID=1000) even such PC still had enough memory.
    For example:
       Total memory is 2G, current used is 1.43G, but URLStream.readBytes() still throw such exception.
    For file with little size such as 30M, there isn't such problem.
    Could any body give some suggestion?
    Best regards,
    Sourcecode is very simple like:
      var myStream:URLStream;
      var inputBytes: ByteArray = new ByteArray();
      ... do load ...
      // load by progressive event. I only deal progress load once, and ignore all later progressive load events.
      // for example first 500KBytes was read.
      myStream(inputBytes,inputBytes.length);
      // load again when all datas is loaded completely. For example, 180MBytes should be read.
      try {
        myStream(inputBytes,inputBytes.length);
      }  catch(e:*) {
        // warning log

    When I try to load a file as 180MBytes by using URLStream.readBytes(). 
    In some PCs, it's OK.
    But in some PCs, there are always [out of memory] exception (errorID=1000) even such PC still had enough memory.
    For example:
       Total memory is 2G, current used is 1.43G, but URLStream.readBytes() still throw such exception.
    For file with little size such as 30M, there isn't such problem.
    Could any body give some suggestion?
    Best regards,
    Sourcecode is very simple like:
      var myStream:URLStream;
      var inputBytes: ByteArray = new ByteArray();
      ... do load ...
      // load by progressive event. I only deal progress load once, and ignore all later progressive load events.
      // for example first 500KBytes was read.
      myStream(inputBytes,inputBytes.length);
      // load again when all datas is loaded completely. For example, 180MBytes should be read.
      try {
        myStream(inputBytes,inputBytes.length);
      }  catch(e:*) {
        // warning log

  • Large DataTable causes out of memory exception

    Hello Support 
    We have a datatable that returns 112970 records and have 51 columns.
    When we try generate an xls file or display data result in grid view than "System Out of memory exception" is thrown.
    OS : Windows 2003 Enterprise 32 Bit
    HP DL380 G4
    CPU 2x3.6GHZ
    6 GB RAM
    Can you help us to find a resolution to this issue?
    Thank you
    Shrenik
    Maurice

    Thanks for reply.
    1> .XLXS format allows us >= 133000 records in spread sheet some times and some times it throws Exception of type 'System.OutOfMemoryException'.
    2> We are using asp.net gridview.
    Exception:
     ExceptionObject : Message : Exception of type 'System.OutOfMemoryException' was thrown.
    Data : System.Collections.ListDictionaryInternal
    InnerException : Nothing
    TargetSite : System.String ToBase64String(Byte[], Int32, Int32, System.Base64FormattingOptions)
    StackTrace :    at System.Convert.ToBase64String(Byte[] inArray, Int32 offset, Int32 length, Base64FormattingOptions options)
       at System.Web.UI.ObjectStateFormatter.Serialize(Object stateGraph, Purpose purpose)
       at System.Web.UI.ObjectStateFormatter.System.Web.UI.IStateFormatter2.Serialize(Object state, Purpose purpose)
       at System.Web.UI.Util.SerializeWithAssert(IStateFormatter2 formatter, Object stateGraph, Purpose purpose)
       at System.Web.UI.HiddenFieldPageStatePersister.Save()
       at System.Web.UI.Page.SavePageStateToPersistenceMedium(Object state)
       at System.Web.UI.Page.SaveAllState()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) HelpLink : Nothing Source : mscorlib HResult : -2147024882
    Please see below code for more information.
        protected void Button1_Click(object sender, EventArgs e)
            try
                DataTable _dt = GetDataFromDB();
                ViewState["dtQueryResults"] = _dt;
                BindgvQueryResults();
                messageLabel.Text = "";
            catch (Exception ex)
                messageLabel.Text = "Query execute error: " + ex.Message;
        private void BindgvQueryResults()
            if (ViewState["dtQueryResults"] != null)
                DataView _dv = ((DataTable)ViewState["dtQueryResults"]).DefaultView;
                if (ViewState["gvQRSortExpression"] != null && ViewState["gvQRSortDirection"] != null)
                    _dv.Sort = ViewState["gvQRSortExpression"].ToString() + ViewState["gvQRSortDirection"].ToString();
                gvQueryResults.DataSource = _dv;
                gvQueryResults.DataBind();
    private DataTable GetDataFromDB()
            SqlCommand _Cmd = null;
            SqlConnection _Con = null;
            try
                _Con = DBInteraction.InstantiateConnection();
                _Cmd = new SqlCommand();
                _Cmd.Connection = _Con;
                _Cmd.CommandTimeout = 300;
                if (_Con.State != ConnectionState.Open)
                    _Con.Open();
                try
                    _Cmd.CommandText = CriteriaBuilder1.QueryTransformer.Sql;
                catch(NullReferenceException)
                    throw new ApplicationException("Error message.");
                if(string.IsNullOrEmpty(CriteriaBuilder1.QueryTransformer.Sql))
                    throw new ApplicationException("This query does not have any text. Please add views in the query and try again.");
                _Cmd.CommandType = CommandType.Text;
                DataTable _dt = new DataTable();
                SqlDataAdapter adaPTer = new SqlDataAdapter(_Cmd);
                adaPTer.AcceptChangesDuringFill = false;
                adaPTer.Fill(_dt);
                if (_dt.Rows.Count == 0)
                    throw new ApplicationException("Your request did not return any results.");
                return _dt;
            catch (Exception ex)
                throw ex;
            finally
                if (_Con.State == ConnectionState.Open)
                    _Con.Close();
    Maurice

  • Large Bitmaps create out of memory  exception

    Hello,
    I try to generate a "BufferedImage" from a Windows Bitmap file ( xxxx.BMP ) .
    I can read and generate relatively images from relatively small files (e.g. 852x626 pixels works fine),
    but if it comes to larger images, I get an out of memory exception.
    Has anybody an idea how to convince Java to read also large BMP image files.
    If I create an awt "Image" even large images (eg 1200x5000 pixels are generated).
    But unfortunately I have found no way to convert an "Image" to a "BufferedImage" and
    only "BufferedImage" offers all the processing methods needed.
    This is the code snippet I wrote:
    ------------ start of code snippet -----------------------------------------------------
    try {
    DataBufferInt dbBMPInt = new DataBufferInt(nwidth*nheight);
    System.out.println("DataBufferInt = "+dbBMPInt);
    int [] bitMasks = new int[3];
    bitMasks[0] = (int)0xff<<16;
    bitMasks[1] = (int)0xff<<8;
    bitMasks[2] = (int)0xff;
    SinglePixelPackedSampleModel spSM = new SinglePixelPackedSampleModel(DataBuffer.TYPE_INT,nwidth,nheight,bitMasks);
    System.out.println("SinglePixelPackedSampleModel = "+spSM);
    WritableRaster bmpRaster = WritableRaster.createWritableRaster((SampleModel) spSM, (DataBuffer) dbBMPInt, new Point(0,0));
    System.out.println("WritableRaster = "+bmpRaster);
    bmpImage = new BufferedImage(nwidth,nheight,BufferedImage.TYPE_3BYTE_BGR);
    System.out.println("BufferedImage = "+bmpImage);
    bmpImage.setData(bmpRaster);
    catch (Exception exCrBm)
    { /* 001 start catch */
    exCrBm.printStackTrace ();
    } /* 001 end catch */
    ----------------------------------------------- end of code snippet --------------------
    and this is the generated output.
    File type is :BM
    Size of file is :1600110
    Size of bitmapinfoheader is :40
    Width is :852
    Height is :626
    Planes is :1
    BitCount is :24
    Compression is :0
    SizeImage is :1600056
    DataBufferInt = java.awt.image.DataBufferInt@1774b9b
    SinglePixelPackedSampleModel = java.awt.image.SinglePixelPackedSampleModel@8080b54
    WritableRaster = IntegerInterleavedRaster: width = 852 height = 626 #Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0
    BufferedImage = BufferedImage@b9e45a: type = 5 ColorModel: #pixelBits = 24 numComponents = 3 color space = java.awt.color.ICC_ColorSpace@3ef810 transparency = 1 has alpha = false isAlphaPre = false ByteInterleavedRaster: width = 852 height = 626 #numDataElements 3 dataOff[0] = 2
    Any help appreciated
    Regards
    Wolfgang

    Increase your maximum heap memory size.
    Se -Xmx parameter of java.exe
    Have a nice programming day,
    Jos�.

  • Getting an Out of memory exception while validating XML against XSD

    Hello friends,
    I am getting an Out Of Memory exception while validating my XML against a given XSd which is huge.
    SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
            saxParserFactory.setValidating(true);
              SAXParser saxParser = saxParserFactory.newSAXParser();
             saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
             saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",new File("C:/todelxsd.xsd")); as u may see the darkened code. this basically Loads the XSD in Memmory , and JVM throws an out of Memory exception. is there any other way round of validating an XML against an XSD where i dont have to load my XSD if not then kindly let me know the solution for above problem .
    Thanks.

    Yes, but increasing the heap size is a temporary solution , isnt there a way where the XML can be validated against an XSD without having to load XSD in memory

  • Getting an out of memory exception while validating my XML against a XSD

    Hello friends,
    I have asked this question in following thread too. Pasting it again here just to saye your time
    http://forum.java.sun.com/thread.jspa?threadID=690812&tstart=0
    I am getting an Out Of Memory exception while validating my XML against a given XSd which is huge.
    SAXParserFactory saxParserFactory = SAXParserFactory.newInstance();
            saxParserFactory.setValidating(true);
              SAXParser saxParser = saxParserFactory.newSAXParser();
             saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");
             saxParser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",new File("C:/todelxsd.xsd")); as u may see the darkened code. this basically Loads the XSD in Memmory , and JVM throws an out of Memory exception. is there any other way round of validating an XML against an XSD where i dont have to load my XSD if not then kindly let me know the solution for above problem .
    Thanks.

    Yes, but increasing the heap size is a temporary solution , isnt there a way where the XML can be validated against an XSD without having to load XSD in memory

Maybe you are looking for