(Enterprise)

Limiting the size of a price list to be exported

We can specify the maximum number of price entries a price list can contain if it is to be exported using the Catalog Filter and Pricing tool. By specifying this maximum number, we can avoid both out-of-memory exceptions and time-out errors caused by overly large price lists. A price entry is a row in a price list.


Task info

By default, the limit is enabled and the maximum number of rows is set to 100000, meaning that a price list can have up to 100,000 rows for the export to proceed. We can change this maximum number to suit the site. Be aware that if you increase the maximum number, this might cause a server crash due to an out-of-memory error. Increasing your JVM memory might resolve problems with out-of-memory errors. Even if an out-of-memory error does not occur after increasing the JVM memory, the browser might still display a time-out error if it takes too long to generate the export file.

If a user tries to export a price list that exceeds the maximum number:

We can also disable the limit.


Procedure

  1. Navigate to the configuration file at the following path: workspace_dir/WC/xml/config/com.ibm.commerce.price-fep/wc-admin-component.xml

  2. Locate the following lines of code:

      <_config:configgrouping name="PriceListExport">
        
        <!-- Whether limit rows of price entries when export a price list. -->
        <_config:property name="limitRows" value="true"/>
        
        <!--
        The maximum number of price entries when limit rows to export.
        Note that if too large, it will cause an OutOfMemory exception that crash the server.
        -->
        <_config:property name="maximumNumber" value="100000"/>
      			
      </_config:configgrouping>

  3. Set the properties for the site:

    Property Description
    limitRows Specifies whether we want to set a limit to the number of rows a price list can contain if it is to be exported.

    The Value parameter can be set to:

      true
      Set to true to set a limit. In this case, we must specify a number for the maximumNumber property (see the next row in this table).

      false
      Set to false if you do not want to set a limit. In this case, the maximumNumber value is ignored.

    maximumNumber Specifies maximum number of number of rows a price list can contain if it is to be exported.

    Set the Value parameter to any suitable number from 1 to 500000.

  4. Save and close the file.

  5. To make the changes take effect, restart the WebSphere Commerce server.


Related concepts
Example: Understanding how prices are displayed on extended sites stores