Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0052238 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2023-04-26 09:30 | 2023-05-16 08:14 | |||
Reporter | malsasua | View Status | public | |||||
Assigned To | AugustoMauch | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | PR23Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | |||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | approved | |||||||
Review Assigned To | ||||||||
OBNetwork customer | Gold | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | 62796 | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0052238: Missing timeout in a query executed in Sales Order window | |||||||
Description | In one customer with big data, a query was running for more than 4 hours. The query was executed without a timeout. It seems that the query was launched from the Sales Order window, but we have not been able to reproduce it. Below are the query and stack trace of the process executing the query. The query is: select order0_.C_Order_ID as col_0_0_ from C_Order order0_ cross join C_DocType documentty1_ where order0_.C_DocTypeTarget_ID=documentty1_.C_DocType_ID and order0_.IsSOTrx='Y' and documentty1_.IsReturn='N' and (documentty1_.DocSubTypeSO not like 'OB') and (order0_.AD_Org_ID in ($1 ,..., $407)) and (order0_.AD_Client_ID in ($408 , $409)) order by order0_.DocumentNo, order0_.C_Order_ID The stack trace is: at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:306) - locked <0x000000028aa780e0> (a org.postgresql.core.v3.QueryExecutorImpl) at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:441) at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:365) at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:155) at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:118) at jdk.internal.reflect.GeneratedMethodAccessor187.invoke(Unknown Source) at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@11.0.18/DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(java.base@11.0.18/Method.java:566) at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114) at com.sun.proxy.$Proxy74.executeQuery(Unknown Source) at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.extract(ResultSetReturnImpl.java:60) at org.hibernate.loader.Loader.getResultSet(Loader.java:2173) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1936) at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1898) at org.hibernate.loader.Loader.scroll(Loader.java:2771) at org.hibernate.loader.hql.QueryLoader.scroll(QueryLoader.java:573) at org.hibernate.hql.internal.ast.QueryTranslatorImpl.scroll(QueryTranslatorImpl.java:448) at org.hibernate.engine.query.spi.HQLQueryPlan.performScroll(HQLQueryPlan.java:358) at org.hibernate.internal.SessionImpl.scroll(SessionImpl.java:1680) at org.hibernate.query.internal.AbstractProducedQuery.doScroll(AbstractProducedQuery.java:1500) at org.hibernate.query.internal.AbstractProducedQuery.scroll(AbstractProducedQuery.java:1486) at org.hibernate.query.internal.AbstractProducedQuery.scroll(AbstractProducedQuery.java:110) at org.openbravo.dal.service.OBQuery.getRowNumber(OBQuery.java:199) at org.openbravo.service.json.DataEntityQueryService.getRowNumber(DataEntityQueryService.java:217) at org.openbravo.service.json.DefaultJsonDataService.createSetQueryService(DefaultJsonDataService.java:784) at org.openbravo.service.json.DefaultJsonDataService.fetch(DefaultJsonDataService.java:221) at org.openbravo.service.datasource.DefaultDataSourceService.fetch(DefaultDataSourceService.java:89) at org.openbravo.service.datasource.DefaultDataSourceService.fetch(DefaultDataSourceService.java:80) at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:293) at org.openbravo.service.datasource.DataSourceServlet.doPost(DataSourceServlet.java:849) at javax.servlet.http.HttpServlet.service(HttpServlet.java:661) at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:200) at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:459) at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:89) at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:60) at org.openbravo.service.datasource.DataSourceServlet.service(DataSourceServlet.java:156) at javax.servlet.http.HttpServlet.service(HttpServlet.java:742) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) | |||||||
Steps To Reproduce | n/a | |||||||
Proposed Solution | add timeout to this query | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0149687) hgbot (developer) 2023-05-15 09:12 |
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/883 [^] |
(0149726) hgbot (developer) 2023-05-16 08:14 |
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/883 [^] |
(0149727) hgbot (developer) 2023-05-16 08:14 |
Directly closing issue as related merge request is already approved. Repository: https://gitlab.com/openbravo/product/openbravo [^] Changeset: fba326fb253ee13d652e590298a7105d8d2ebb99 Author: Augusto Mauch <augusto.mauch@openbravo.com> Date: 15-05-2023 09:11:53 URL: https://gitlab.com/openbravo/product/openbravo/-/commit/fba326fb253ee13d652e590298a7105d8d2ebb99 [^] Fixes ISSUE-52238: Adds missing query timeout to OBQuery.getRowNumber We set timeout to queries according to the query profile by invoking QueryTimeOutUtil.getInstance().setQueryTimeOut(query, queryProfile); In OBQuery, we were doing it on the createQuery method, but not on getRowNumber. --- M src/org/openbravo/dal/service/OBQuery.java --- |
![]() |
|||
Date Modified | Username | Field | Change |
2023-04-26 09:30 | malsasua | New Issue | |
2023-04-26 09:30 | malsasua | Assigned To | => Triage Platform Base |
2023-04-26 09:30 | malsasua | OBNetwork customer | => Gold |
2023-04-26 09:30 | malsasua | Modules | => Core |
2023-04-26 09:30 | malsasua | Support ticket | => 62796 |
2023-04-26 09:30 | malsasua | Triggers an Emergency Pack | => No |
2023-05-15 09:12 | hgbot | Merge Request Status | => open |
2023-05-15 09:12 | hgbot | Note Added: 0149687 | |
2023-05-15 16:04 | AugustoMauch | Status | new => scheduled |
2023-05-15 16:04 | AugustoMauch | Assigned To | Triage Platform Base => AugustoMauch |
2023-05-16 08:13 | hgbot | Merge Request Status | open => approved |
2023-05-16 08:14 | hgbot | Resolution | open => fixed |
2023-05-16 08:14 | hgbot | Status | scheduled => closed |
2023-05-16 08:14 | hgbot | Note Added: 0149726 | |
2023-05-16 08:14 | hgbot | Fixed in Version | => PR23Q3 |
2023-05-16 08:14 | hgbot | Note Added: 0149727 |
Copyright © 2000 - 2009 MantisBT Group |