Skip to Content
author's profile photo
Former Member

JDBC Sender Java Heap Space exception

Hi Friends,

we are getting following error on JDBC sender Adapter: "Exception caught during JDBC adapter processing: java.lang.OutOfMemoryError: Java heap space (failed to allocate 536870936 bytes)."

Please let me know how can we solve this issue?

Kind Regards,

F.Kökce

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • author's profile photo
    Former Member
    Posted on May 04, 2011 at 10:40 AM

    Try to up the java heapspace in RZ10 transaction, probably is lower then message size.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on May 04, 2011 at 12:08 PM

    Hi Fatih,

    First of all, check the following notes that may be useful:

    #994433 - XI AF on J2EE Engine terminates with OutOfMemoryError

    #1295744 - XI/PI Java Components: JVM Perm Size Memory Usage

    Anyway, it appears that JVM installed in your environment may be using an old version.

    Thus I would suggest you upgrading to the latest one as described in SAP Notes 1133020 and 1442124.

    Also check this link for the JVM configuration:

    http://help.sap.com/saphelp_nwce10/helpdata/en/43/73949862c16fcbe10000000a1553f6/content.htm

    As extra recommendations, please check note:

    #1289240 - How to deal with out of memory errors

    - And check if the MaxThreadCount parameter for Application Thread Manager is set to 350. To do so, please go to the Config tool and open cluster data -> server -> cfg -> kernel -> propertysheet -> Application Thread Manager, double-click the property sheet, and change the value of MaxThreadCount.

    Regards,

    Caio Cagnani

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on May 04, 2011 at 01:54 PM

    Question?

    Are you getting out of memory error only for JDBC Sender adapter? Talk to BASIS Team to fix this issue.

    a) if you are running below java 1.5, upgrade to 1.6 might fix this issue

    b) Increase java heap size will prevent this errror

    Basically you have to increase the memory that JVM uses by altering it's arguments value.

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on May 05, 2011 at 09:47 AM

    Hi ,

    You need to increase your JAVA heap size.Please go through SAP Note - 883444, 874123, 862405, 760721,994433 also contact your basis administrator.

    Regards,

    NAveen.

    .

    Add comment
    10|10000 characters needed characters exceeded

  • Posted on May 05, 2011 at 11:38 AM

    How many table entries are you reading at once?

    You should restrict the number of rows which are read the same time, for example to 1000.

    In MS SQL you can do this with select top(1000) * from table where ...

    When you do not restrict the number of rows, you will always run in out-of-memory errors, no matter how you define the heap space in Java.

    Add comment
    10|10000 characters needed characters exceeded

    • In addition to Stefan's recommendation....

      Just few cents ...

      Restrict number of records in db tables in mulitple ways... Here are few...

      a) Please dont write select query using wildchar (lazy coding) like Select * from tablename... Instead specify fields to

      select like

      Example: Select name, address, zipcode from tablename

      b) Use Extended Where clause.... very helpful to restrict records..

      Select A,B,C from tablename where X = "ID" and Y="thisvalue" and  Z="somevalue"

      C) In oracle or mysql to select only specfiy number of records.

      Select A,B,C from tablename where rownum < 500

      Note: Since we can't predict production live data , there is no harm in increasing java heap space.