cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC sender adapter outofmemory error

Former Member
0 Kudos

Dear friends,

We are getting following error on JDBC sender Adapter: Error during conversion of query result to XML: java.lang.OutOfMemoryError: Java heap space (failed to allocate 1073741848 bytes)

I have read blogs where there have been suggestions to limit the amount of data picked by using WHERE condition and not using SELECT *

In our scenario we are creating GL IDOCs . In SQL when PI picks it up it needs to get all the corresponding Header and line items together. We cannot randomly pick 1000 records at a time. The SQL table has 500,000 rows in the following format

H H H L1 L1 L1

H H H L2 L2 L2

H H H L3 L3 L3

H1 H1 H1 L1 L1 L1

H1 H1 H1 L2 L2 L2

H1 H1 H1 L3 L3 L3

Please let me know how can we solve this issue?

Thank you,

Teresa

Edited by: Teresa lytle on Sep 27, 2011 3:13 PM

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

This is pretty standard error. To fix this...

a) You can increase java heap size. Talk to BASIS team

b) You can design interface to read data of mesg size not more than 5 mb.

c) Also if you increase your hardware, memory resources this problem can be avoided.

I would recommend to design interface in such a way to read only required fields in the select query and control message size for each time.

Refer this [link |http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/17243] [original link is broken] [original link is broken] [original link is broken];for controlling high volume data...

Former Member
0 Kudos

Hi Baskar,

Thank you for the suggestions. We cannot limit the data as I had mentioned we need to be able to pick up both the header and its corresponding line items to process one posting correctly.

Will memory increase resolve the issue? I am surprised PI cannot handle this size of messages.

Thanks,

Teresa

baskar_gopalakrishnan2
Active Contributor
0 Kudos

For optimum performance PI recommends memory size of the mesg upto 5 MB. That does not meant 5 MB is the max limit. Increase java heap size and going for memory and hardware increase could help to someextent.

Answers (2)

Answers (2)

GabrielSagaya
Active Contributor
0 Kudos

If you are using oracle database, uses ROWNUM field to fetch first set of records and you can update those records with the flag as true.

similarly If you are using MS SQL database, uses SELECT TOP command to fetch first set of records and you can update those records with the flag as true.

Like File/FTP adapter, the next poll interval would be as scheduled. The Administrator can then alter the table contents, to ensure lesser no of records are picked up.

Here You need to limit the no of rows if you again face the problem. Please chec the SAP Note

https://websmp230.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=1296819

Former Member
0 Kudos

The BASIS team cannot increase the memory and it it is set at 1024 MB. I am going to change the SQL statement to fetch fewer records in one call than bringing the entire table and mapping to IDOCs.

Thanks for all your suggestions and feedback.

Teresa

Eoin_Kierans
Product and Topic Expert
Product and Topic Expert
0 Kudos

Check the steps within the note #994433 'XI AF on J2EE Engine terminates with OutOfemoryError'

Former Member
0 Kudos

We are trying to process 1024 MB of SQL data. I guess when PI JDBC sender adapter converts it into XML the size doubles.

How much Java heap space is recommended for PI 7.1?

Teresa