Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0011044Openbravo ERPA. Platformpublic2009-10-20 03:112009-11-19 00:00
carbonete 
mtaal 
urgentmajoralways
closedfixed 
20rPath Linux
2.50MP3 
 
Core
No
0011044: Java out off memory in REST Query
When executing in Openbravo Vmware appliance

Openbravo 2.50 MP3
Version number: 2.50.14398
Revision ID: b3688248897f+

 

this query

http://10.0.0.3/openbravo/ws/dal/Invoice?where=client.id=%271000000%27%20and%20organization.id%20=%20%271000000%27&l=xxxx&p=xxxxx [^]

I receive this error

<ob:error xmlns:ob="http://www.openbravo.com"><message>Java [^] heap space</message></ob:error>

I sizeup tomcat to 1024M and virtual machine size to 1700M but don´t work I think that´s have a provlem in REST.
thanks in advance

Carbonete
Execute any query that´s return many lines.

Like http://10.0.0.3/openbravo/ws/dal/BusinessPartner [^]
No tags attached.
Issue History
2009-10-20 03:11carboneteNew Issue
2009-10-20 03:11carboneteAssigned To => rafaroda
2009-10-20 04:05rafarodaNote Added: 0021193
2009-10-20 04:05rafarodaAssigned Torafaroda => mtaal
2009-10-20 04:05rafarodaPrioritynormal => urgent
2009-10-20 04:05rafarodaSeveritycritical => major
2009-10-20 04:05rafarodaStatusnew => scheduled
2009-11-10 23:39hgbotCheckin
2009-11-10 23:39hgbotNote Added: 0021701
2009-11-10 23:39hgbotStatusscheduled => resolved
2009-11-10 23:39hgbotResolutionopen => fixed
2009-11-10 23:39hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/ebff7c542c9755c1d15458fcf16e3cf2e5ddea21 [^]
2009-11-10 23:50mtaalNote Added: 0021702
2009-11-18 16:27shuehnerNote Added: 0021976
2009-11-18 16:27shuehnerStatusresolved => closed
2009-11-19 00:00anonymoussf_bug_id0 => 2900148

Notes
(0021193)
rafaroda   
2009-10-20 04:05   
Happens also in http://demo4.openbravo.com/openbravo/ws/dal/BusinessPartner [^] which has many partner records and is a fine tuned machine.
(0021701)
hgbot   
2009-11-10 23:39   
Repository: erp/devel/pi
Changeset: ebff7c542c9755c1d15458fcf16e3cf2e5ddea21
Author: Martin Taal <martin.taal <at> openbravo.com>
Date: Tue Nov 10 23:39:23 2009 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/ebff7c542c9755c1d15458fcf16e3cf2e5ddea21 [^]

fixes issue 11044: Java out off memory in REST Query

---
M src/org/openbravo/base/session/SessionFactoryController.java
M src/org/openbravo/dal/service/OBQuery.java
M src/org/openbravo/dal/xml/EntityXMLConverter.java
M src/org/openbravo/service/rest/DalWebService.java
---
(0021702)
mtaal   
2009-11-10 23:50   
Fyi, I made changes to use a stream based approach. So the objects are read from the database and directly streamed to the writer which writes the bytes to the browser.
I tested and exporting 5000 business partners with invoice lines etc. never exceeds memory usage of 130mb and most of the time it is less than 100mb.

I will also add a parameter includeChildren to make it possible to only export objects itself and not the child objects.

gr. Martin
(0021976)
shuehner   
2009-11-18 16:27   
Tested as failing in older pi and tested as server did not report any error on request for /<context>/ws/dal/Product with 25k products. Not verified that result load fine in a browser as 25k product xml does not load fine in browser and result will be loaded into some custom application in real cases. In current pi heapsize is stable and low will doing the rest query.