Uploaded image for project: 'PUBLIC - Liferay Commerce'
  1. PUBLIC - Liferay Commerce
  2. COMMERCE-9354

Performance improvements in checkout and order engine

Details

    Description

      Hi Team,

      I kindly ask for your help with this case. Because of the high amount of orders, I can not test the case.

      Please find all the information collected from the HC ticket:

      When we create an order which contains a large number of items ( 1000 - 20000 items) then after you finish all the checkout steps and go to the order detail as an order manager/administrator ( Control Panel -> Commerce -> Orders -> Order detail then after a couple of minutes, the system fails with 504 error ( gateway timeout).

      Note 1: When you go as a buyer to the placed order and open the same order then everything is loaded properly.

      Note 2: I can see from the JVM trace there are JDBC selects that are repeating per each item and this is a cause of the issue:

      jdbc query: select commerceor0_.commerceOrderItemId as commer ... order by commerceor0_.createDate ASC [169127] => 20000 rows

      jdbc query: select commerceor0_.commerceOrderItemId as commer ... order by commerceor0_.createDate ASC [169127] => 20000 rows

      jdbc query: select commercein0_.CIBookedQuantityId as CIBooke ... 0_ where commercein0_.CIBookedQuantityId=? [169161] => 0 rows

      jdbc query: SELECT SUM(CIWarehouseItem.quantity - CIWarehou ... p_.groupId = ?) [20097, 'MIN93027', 20097, 39718] => 1 row

      jdbc query: select commercein0_.CIBookedQuantityId as CIBooke ... ein0_.CIBookedQuantityId ASC [20097, 'MIN93027'] => 1555 rows

      jdbc query: select commerceor0_.commerceOrderItemId as commer ... order by commerceor0_.createDate ASC [169127] => 20000 rows

      jdbc query: SELECT SUM(CIWarehouseItem.quantity - CIWarehou ... p_.groupId = ?) [20097, 'MIN93027', 20097, 39718] => 1 row

      jdbc query: select commerceor0_.commerceOrderItemId as commer ... order by commerceor0_.createDate ASC [169127] => 20000 rows

      jdbc query: SELECT SUM(CIWarehouseItem.quantity - CIWarehou ... p_.groupId = ?) [20097, 'MIN93027', 20097, 39718] => 1 row

      jdbc query: select commerceor0_.commerceOrderItemId as commer ... order by commerceor0_.createDate ASC [169127] => 20000 rows

      jdbc query: SELECT SUM(CIWarehouseItem.quantity - CIWarehou ... p_.groupId = ?) [20097, 'MIN93027', 20097, 39718] => 1 row

      jdbc query: select commerceor0_.commerceOrderItemId as commer ... order by commerceor0_.createDate ASC [169127] => 20000 rows

      jdbc query: SELECT SUM(CIWarehouseItem.quantity - CIWarehou ... p_.groupId = ?) [20097, 'MIN93027', 20097, 39718] => 1 row

      jdbc query: select commerceor0_.commerceOrderItemId as commer ... order by commerceor0_.createDate ASC [169127] => 20000 rows

      jdbc query: SELECT SUM(CIWarehouseItem.quantity - CIWarehou ... p_.groupId = ?) [20097, 'MIN93027', 20097, 39718] => 1 row

      jdbc query: select commerceor0_.commerceOrderItemId as commer ... order by commerceor0_.createDate ASC [169127] => 20000 rows

      jdbc query: SELECT SUM(CIWarehouseItem.quantity - CIWarehou ... p_.groupId = ?) [20097, 'MIN93027', 20097, 39718] => 1 row

      jdbc query: select commerceor0_.commerceOrderItemId as commer ... order by commerceor0_.createDate ASC [169127] => 20000 rows

      jdbc query: SELECT SUM(CIWarehouseItem.quantity - CIWarehou ... p_.groupId = ?) [20097, 'MIN93027', 20097, 39718] => 1 row

      jdbc query: select commerceor0_.commerceOrderItemId as commer ... order by commerceor0_.createDate ASC [169127] => 20000 rows

      jdbc query: SELECT SUM(CIWarehouseItem.quantity - CIWarehou ... p_.groupId = ?) [20097, 'MIN93027', 20097, 39718] => 1 row

      Note3: we're creating these orders programmatically. In most cases is only 1,2 items which are split into many order items with different addresses. However, you can replicate the same behavior from manual purchase. You only need to put into the basket 1000/20000 different SKUs.

      Attachments

        Activity

          People

            alessandro.iovane Alessandro Iovane
            riccardo.alberti Riccardo Alberti
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Packages

                Version Package
                7.4 DXP U44