Symptoms

It is not possible to view the list of all orders (Home > Operations > Orders > All Orders), an exception is displayed:

System Error
Data packet type error. Type: 6 Index: 1

In the generic_worker.log a statement timeout error can be seen:

[15-11-21 11:55:48.351 Worker1.3   RQ11351393 TRC] +++[0] ListResult* BM::SalesOrderGetAgentOrderListPageData(DataPacket*)()
...
[15-11-21 11:56:48.358 RDBMS       RQ11351393 NTE] Code: 1000. ODBC code #57014: ERROR: canceling statement due to statement timeout;
Error while executing the query
[15-11-21 11:56:48.358 Worker1.3   RQ11351393 TRC] ...[0] *** INTERRUPTED BY EXCEPTION *** ListResult* BM::SalesOrderGetAgentOrderListPageData(DataPacket*)
[15-11-21 11:56:48.358 Worker1.3   RQ11351393 NTE] Finished method BM_Container::Worker1.3.SalesOrderGetAgentOrderListPageData(user = 1, transaction = 0, SID = 31627, lang = en, HP)

Cause

There is a bug with id #PBA-76850 ("Non-optimized select on BM::SalesOrderGetAgentOrderListPageData when "All Orders" are displayed with huge amount of orders"). The root cause of the issue is a big number of orders.

Resolution

  1. vacuum analyze, reindex the table

    pba=> analyze verbose "SalesOrder";
    INFO:  analyzing "public.SalesOrder"
    INFO:  "SalesOrder": scanned 30000 of 224262 pages, containing 1017616 live rows and 30671 dead rows; 30000 rows in sample, 7717384 estimated total rows ANALYZE
    
  2. archive the old orders
  3. update an installation to OSA 7.0.1, where bug #PBA-76850 is fixed

As a workaround to see the list of orders in a current BA version remove the customization files which are generated automatically (where search parameters are set). For example if you use the user admin (with id 1) to login to the control panel, remove the file /usr/local/bm/conf/wnd/BM/1.customization/SalesOrder_AgentOrderList.xml

Internal content

Link on internal Article