Skip to Content

B1iF not release Memory

I've set in my B1iF server the maximum ram memory to 12 gb because I've got a scenario that uses a lot of memory creating select and insert query with a lot of rows and with less memory goes in outofmemory.

The first time the scenario is called the ram memory used by tomcat increase quickly but, after the scenario execution correctly ends, that memory is not freed so the second time the scenario is called I still have an error:

java.lang.OutOfMemoryError: Java heap space (failed to allocate*** bytes)

What can i Do to force the B1if to free the memory?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Nov 22, 2016 at 01:59 PM

    Hi Luca,

    B1i is developed in JAVA, JAVA is managed code. That means that JAVA controls the memory, not B1i.

    The 12 GB is the upper bound of the usable memory, and the allocation means it can be used immediately if not other processes run in parallel. The upper bound of 12GB memory caused a JAVA heap space, it's irrelevant if the allocated memory would have been given free first.

    Couldn't it be that your second run is bigger than the first one so allocated memory of 12GB is not enough?

    Which kind of scenario are you trying to proceed and about how many rows are we talking about?

    Maybe the issue can be avoided by alternative scenario design (split into more steps, avoid graphical for-each loops in the process design, ...).

    Best regards

    Bastian

    P.S.: after the redesign of the SCN I'm not monitoring questions on a regular basis anymore as I can't find the B1i relevant questions between all the other stuff in an effective manner.

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 22, 2016 at 03:09 PM

    Couldn't it be that your second run is bigger than the first one so allocated memory of 12GB is not enough?

    No the second run is equal to the first one but seems that after the first one the memory is used by some pother internal process.. because only the secnd time the error appears.

    Which kind of scenario are you trying to proceed and about how many rows are we talking about?

    There is first this scenario that listen to a sap event and then does a select of 20000 rows in the sap DB then in output does an insert of the same 20000 rows to another DB.

    This scenario calls another scenario that takes the output of the preceeding and then calls a web service. If all goes well a message is sent to SAP otherwise it is called an error scenario.

    In the first round all these scenario are correctly called. When i retry the initial update in sap that has to fire these scenario another time I ALWAYS have an Outofmemory. That's why i think that B1i is wasting memory...

    Add comment
    10|10000 characters needed characters exceeded