Friday, 22 September 2017

Database Timeouts

Hi Everyone,

As you may know all databases queries (like, Insert, Update, Delete, Select) should have timeout to prevent deadlock and prevent over-usage of hardware resources.

In Acumatica we have 2 timeout for Select query:
  1. Report Timeout - is used only for reports, as it may need some time to retrieve data from database for big report. To configure it you can use reportQueryTimeout="100" in PXSqlDatabaseProvider section of Web.config file. Parameter is defined in seconds and has default value as 30 seconds. You can read more here.
  2. Querry Timeout - is used only for inquires and other selects, as some inquiries also might take more time than allowed by default. To configure it you can use queryTimeout="100" in PXSqlDatabaseProvider section of Web.config file. Parameter is defined in seconds and has default value as 30 seconds. You can read more here.
For performance and deadlock-protection reasons Acumatica does not have general timeout configurations for Insert/Update/Delete, however you can change it from code using PXCommandScope (read more here). If you create that scope and change timeout, than next SQL command will be executed with your timeout.

Have a nice queries!




No comments: