cancel
Showing results for 
Search instead for 
Did you mean: 

High memory retention in process using SAP Java Connector

Former Member
0 Kudos

We have a process that uses the JCO library to connect with an SAP server and obtain data by executing BAPI(s). However, one of our customers is obtaining very large data sets (250,000 rows) when invoking custom BAPI(s) that pushes the private bytes (as referenced from Process Explorer) into the hundreds of megabytes with the virtual size approaching or exceeding 1 gigabyte. Shouldn't the memory be released eventually? The software is running on Windows 2003 Server sp1 with 4 Gbytes of memory and we are using the SAP Java Connector v2.1.1 and JDK v1.4.2.

We have tried using the JCO.Pool.setResetOnRelease(), to enable a reset whenever a connection is returned to the pool but this did not have any affect.

We also applied a garbage collection/monitoring thread technique that we have used elsewhere and saw a 10% drop overall, but we need to do better.

It is also interesting to note that we never get an OOM error.

Any suggestion on how to get the memory retention under control?

Thanks in advance.

Message was edited by:

Jim OHearn

Message was edited by:

Jim OHearn

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jim,

You can improve your performance by inactivating those table parameters that your applications doesn't need. This is accomplished by invoking

setActive()

method, available both for the JCO.ParameterList and JCO.Request.

Sample code :

function.getTableParameterList().setActive(false,"TABLE_UNUSED");

And see in JCO docs: the method releaseClient(JCO.Client client) in JCO.PoolManager

Best regards,

Mathieu

Former Member
0 Kudos

I had been using the setActive() method on the export parameter list and was wondering whether applying the same technique to the table parameter list would also be helpful.

Thanks for the input.

Answers (0)