Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0037214 | Openbravo ERP | A. Platform | public | 2017-11-02 17:28 | 2018-01-03 12:39 |
|
Reporter | egoitz | |
Assigned To | inigosanchez | |
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR18Q1 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | |
Regression date | |
Regression introduced in release | |
Regression introduced by commit | |
Triggers an Emergency Pack | No |
|
Summary | 0037214: It is possible to produce a server crash executing on the sql query window a query returning thousands of records |
Description | If you execute a query on the sql query window that returns thousands of rows the tomcat can stop responding due to high memory usage of the jvm. |
Steps To Reproduce | 1.- Login as "System Administrator - System" in the ERP
2.- Go to [SQL Query] window.
3.- Execute the following sql:
-> SELECT * FROM ad_field af1, ad_field af2, ad_field af3
4.- Check Tomcat is not responding due to high memory usage of the JVM. Error is raised in the log:
711327 [http-bio-8080-exec-1] ERROR org.openbravo.xmlEngine.ErrorManagement - in designorg/openbravo/erpCommon/ad_forms/SQLExecutor.structureHeader
java.lang.OutOfMemoryError: GC overhead limit exceeded
Dumping heap to java_pid21158.hprof ...
Heap dump file created [1768632959 bytes in 10,052 secs]
|
Proposed Solution | |
Additional Information | |
Tags | Performance |
Relationships | related to | defect | 0035838 | | closed | inigosanchez | Bad performance in alert window when having +20000 records in ad_alert and many of them are solved |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2017-11-02 17:28 | egoitz | New Issue | |
2017-11-02 17:28 | egoitz | Assigned To | => platform |
2017-11-02 17:28 | egoitz | Modules | => Core |
2017-11-02 17:28 | egoitz | Resolution time | => 1511132400 |
2017-11-02 17:28 | egoitz | Triggers an Emergency Pack | => No |
2017-11-06 13:12 | alostale | Relationship added | related to 0035838 |
2017-11-06 13:13 | alostale | Status | new => acknowledged |
2017-11-06 17:42 | egoitz | Description Updated | bug_revision_view_page.php?rev_id=16236#r16236 |
2017-11-06 17:42 | egoitz | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=16238#r16238 |
2017-11-07 13:34 | egoitz | Description Updated | bug_revision_view_page.php?rev_id=16244#r16244 |
2017-11-08 17:15 | inigosanchez | Assigned To | platform => inigosanchez |
2017-11-08 17:15 | inigosanchez | Status | acknowledged => scheduled |
2017-11-08 17:15 | inigosanchez | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=16252#r16252 |
2017-11-08 17:28 | inigosanchez | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=16253#r16253 |
2017-11-10 09:03 | alostale | Tag Attached: Performance | |
2017-11-10 10:36 | hgbot | Checkin | |
2017-11-10 10:36 | hgbot | Note Added: 0100417 | |
2017-11-10 10:36 | hgbot | Checkin | |
2017-11-10 10:36 | hgbot | Note Added: 0100418 | |
2017-11-10 10:36 | hgbot | Status | scheduled => resolved |
2017-11-10 10:36 | hgbot | Resolution | open => fixed |
2017-11-10 10:36 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/0a1c870b2e2c159d159edcf062ce72e205c0c7b0 [^] |
2017-11-10 11:14 | inigosanchez | Note Added: 0100419 | |
2017-11-10 12:49 | inigosanchez | Note Edited: 0100419 | bug_revision_view_page.php?bugnote_id=0100419#r16267 |
2017-11-10 13:00 | alostale | Note Added: 0100423 | |
2017-11-10 13:00 | alostale | Status | resolved => new |
2017-11-10 13:00 | alostale | Resolution | fixed => open |
2017-11-14 16:13 | inigosanchez | Status | new => scheduled |
2017-11-14 17:16 | hgbot | Checkin | |
2017-11-14 17:16 | hgbot | Note Added: 0100522 | |
2017-11-14 17:16 | hgbot | Status | scheduled => resolved |
2017-11-14 17:16 | hgbot | Resolution | open => fixed |
2017-11-14 17:16 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/0a1c870b2e2c159d159edcf062ce72e205c0c7b0 [^] => http://code.openbravo.com/erp/devel/pi/rev/9ea13ff843c312c1efb407034ffc46b7dc1d012d [^] |
2017-11-16 08:49 | hgbot | Checkin | |
2017-11-16 08:49 | hgbot | Note Added: 0100538 | |
2017-11-16 08:50 | alostale | Review Assigned To | => alostale |
2017-11-16 08:50 | alostale | Note Added: 0100539 | |
2017-11-16 08:50 | alostale | Status | resolved => closed |
2017-11-16 08:50 | alostale | Fixed in Version | => 3.0PR18Q1 |
2018-01-03 12:38 | hudsonbot | Checkin | |
2018-01-03 12:38 | hudsonbot | Note Added: 0101398 | |
2018-01-03 12:38 | hudsonbot | Checkin | |
2018-01-03 12:38 | hudsonbot | Note Added: 0101399 | |
2018-01-03 12:39 | hudsonbot | Checkin | |
2018-01-03 12:39 | hudsonbot | Note Added: 0101420 | |
2018-01-03 12:39 | hudsonbot | Checkin | |
2018-01-03 12:39 | hudsonbot | Note Added: 0101424 | |
Notes |
|
(0100417)
|
hgbot
|
2017-11-10 10:36
|
|
Repository: erp/devel/pi
Changeset: 273381bbd0b51fbbdd92b1ca33bca79e82d16ffd
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Nov 10 10:34:03 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/273381bbd0b51fbbdd92b1ca33bca79e82d16ffd [^]
Related to issue 37214: initial code clean-up
- Removed commented code.
- The showsErrorMessage method is used to avoids duplicate code.
- The errors now are showed to the user.
---
M src/org/openbravo/erpCommon/ad_forms/SQLExecutor.java
---
|
|
|
(0100418)
|
hgbot
|
2017-11-10 10:36
|
|
Repository: erp/devel/pi
Changeset: 0a1c870b2e2c159d159edcf062ce72e205c0c7b0
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Fri Nov 10 10:35:18 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/0a1c870b2e2c159d159edcf062ce72e205c0c7b0 [^]
Fixed issue 37214: Improved performance in SQL Query manual window
It was possible to produce a server crash executing on the sql query window a query returning
thousands of records. An OutOfMemoryError error is raised although only 20 records were showed
to the user because in fact, all the records were retrieving from the db instead of the 20 needed
records.
In order to fix the performance problem, now the queries are executed as a Native SQL with OFFSET
(org.hibernate.SQLQuery.setFirstResult) and LIMIT (org.hibernate.SQLQuery.setMaxResults). Now the
performance problem has been fixed.
---
M src/org/openbravo/erpCommon/ad_forms/SQLExecutor_Query.java
---
|
|
|
(0100419)
|
inigosanchez
|
2017-11-10 11:14
(edited on: 2017-11-10 12:49) |
|
Tested in PG 9.4 and ORA 12. Times in org.openbravo.erpCommon.ad_forms.SQLExecutor.doPost:
- With PG 9.4:
-- Query [1]. Before: OutOfMemoryError. After improvements: 280 ms.
-- Query [2]. Before: 5577 ms. After improvements: 252 ms.
Queries:
[1] SELECT * FROM AD_FIELD A1, AD_FIELD A2, AD_FIELD A3
[2] SELECT * FROM AD_ORG A1, AD_ORG A2, AD_ORG A3, AD_ORG A4, AD_ORG A5
|
|
|
|
|
|
(0100522)
|
hgbot
|
2017-11-14 17:16
|
|
Repository: erp/devel/pi
Changeset: 9ea13ff843c312c1efb407034ffc46b7dc1d012d
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Tue Nov 14 17:16:19 2017 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/9ea13ff843c312c1efb407034ffc46b7dc1d012d [^]
Fixed issue 37214: Code review improvements.
Several changes have been done:
- Now it is possible to execute a query with a single column in the result because it is take into account when the result has a single column as result.
- The first column is not ommited and it is shown as expected.
- Fixed a problem in the export to excel: The first row is not shown in the excel. Now this problem has been fixed.
- Same errors are shown when clicking on FIND icon or in REFRESH icon.
- Several unnecessary logs have been removed.
- The PreparedStatement is closed.
---
M src/org/openbravo/erpCommon/ad_forms/SQLExecutor.java
M src/org/openbravo/erpCommon/ad_forms/SQLExecutor_Query.java
---
|
|
|
(0100538)
|
hgbot
|
2017-11-16 08:49
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|