Results 1 to 3 of 3

Thread: Out Of Memory in Production DB - Suggestions

  1. #1

    Default Out Of Memory in Production DB - Suggestions

    Hi All,
    I am getting out of memory While running my application in Production database (size 950 GB) . For testing we have extracted data (15 GB) and ran the application we didn't get any out of memory.

    Note: The reader query will get same 200 records for both the production copy and also the Extracted copy.

    We have increase the Heap memory to 1 GB (-Xmx1024m) and -XX:MaxPermSize=1024m. but still we have same issue.

    We have requested for the HeapDump to analysis the Memory Leak.(Waiting for the HeapDump). Once we get HeapDump we can use VisualVM to identify the issue. Currently we don't have access to the Production copy.

    We are using Spring batch 2.1, Hibernate3, Sql server 2005.

    Can anyone suggest what will be the issue?
    Thanks & Regards,
    Arun Duraisamy

  2. #2

    Default

    How large is a record?

    ORM models can be quite complex, lets say one record consists of n level of mapped entities, with lists etc.

    I did not test it yet, but i can imagine the hibernate entities might pollute the session, meaning the GC has no chance to free the memory, see stackoverflowand aunt google

    without deep knowledge of your configuration and code its really just wild guessing

  3. #3

    Default

    Thanks for your reply michael.

    we got HeapDump. Using VisualVM we identified the issue. One of retrieval loading N number of data.
    we have corrected this issue.

    This is my Application Business logic. Please suggest me.
    Reader will read the data from BatchList table.
    Processor - get the corresponding data from more than 10 tables(according to the business).
    Writer - update the BatchList table status to completed.

    my job commit intervel is 1.
    If any system error occured, batch should fail.
    If any business exception occures, batch should continue with next item by skipping the current BatchList record.

    Doubts:
    1. my commit intervel is 1. Session will committed for every item. In this case HibernateTransactionManager will hold the committed objects in the session?
    If answer is YES, then how to perform Session.clear?
    Last edited by arun4; Jan 20th, 2012 at 10:39 AM.
    Thanks & Regards,
    Arun Duraisamy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •