[GETLIMIT]
[GETLIMIT]
The PrismServer installer adds a GETLIMIT section to the following Prism config files:
- PrismBackoffice.ini
- PrismCommon.ini
- RPSServiceModule.ini
The GETLIMIT section in certain .ini fles restricts the total number of records returned by a GET request for certain resources to 100. The intent of the GETLIMIT is to catch GET requests that unintentionally request a huge data payload that could slow or hang a Prism service. This could occur when a request is generated dynamically and fails to include a filter.
By default, the following resources have a GETLIMIT defined:
RPSRestServiceModule.ini: company, customer, customerlist, document, drawerevent, inventory, invnlot, invnserial, inventorystyle, InventoryList, InventoryStyleList, timeclock, zoutcontrol
PrismBackOffice.ini: adjustment, document, inventory, invnlot, invnserial, InventoryList, InventoryStyleList, purchaseorder, transferorder, transferslip, vendorinvoice
PrismCommon.ini: customer, customerlist
Notes
- Limits are applicable to the top-level resource only (for example, applicable for document, but not applicable to document items or tenders).
- Limits are set for each resource individually
- The GETLIMIT only applies to GET requests that don't include pagination. Most GET requests from the web client in which large amounts of data may be returned include pagination. As such most web client requests will not be affected by a GETLIMIT specification.
- The GETLIMIT section is added to config files in both fresh and over-the-top installs
- If a user has changed a GETLIMIT value for a resource, an over-the-top install will not overwrite that GETLIMIT value
- After changing a GETLIMIT setting, the service must be restarted for it to take effect
- To remove a GETLIMIT restriction on a resource in an INI file, set the value to zero. Removing the GETLIMIT section has the same effect, however, the next over-the-top install will reinsert the GETLIMIT section for that resource.
- GETLIMIT key values must be edited manually in the individual .ini files (not in the Service Manager area of Tech Toolkit).
- If a resource is not listed or is listed with 0 limit (zero), the protection is turned OFF. A positive number enforces a hard limit on the number of rows that will be loaded from the database.
- A complete list of resources that can be added to the GETLIMIT section of each of the .ini files is listed at the end of this topic.
Example
[GETLIMIT]
# what to do if no SID or filter is passed for top-level resource:
# >0: limit number of rows fetched (up to 10000)
# 0: no limit (default)
# -1: fetch but log a warning
# -2: do not fetch and log a warning
# -3: error out
company=100
customer=100
customerlist-100
document=100
inventory=100
invnlot=100
invserial=100
InventoryList=100
InventoryStyleList=100
timeclock=100
zoutcontrol=100
Use Negative Numbers for Troubleshooting
Negative numbers are meant to be used during development or troubleshooting:
- # -1: The server will try to load all rows that are requested but will log a warning message to the log file (even on log level 1).
- # -2: The server will NOT try to load any row from the database and will log a warning message (same as (a), but will avoid potential "out of memory" errors).
- # -3: The server will return an error to the client instead of loading rows from the database (useful for early detection of unexpected unfiltered requests during development).
If a warning needs to be logged, it will be in a format similar to the entry below. If you need to locate it in the logs, search for "record limit problem detected."
Example: "2019.11.11.13.57.33.019 [2212] - WARNING - Record limit problem detected for resource inventory: GetList called with no pagination or SID - limit reached."
Resources that can be added to the GETLIMIT section:
RPSRESTServiceModule
acpublisher |
|
employee |
|
session |
BackofficeService.ini
addresstype |
|
invnlot |
|
purchaseorder |
CommonService.ini
controller |
|
prismresource |
|
v9initializationstatus |