"Internal query execution timeout (180 seconds) exceeded" during search
Version: PVE: R86
Article ID: PE000206
Description
Summary
Summary:
When attempting to run a search in a PaperVision Enterprise system with a large amount of documents, document security levels, or a slow database, you may encounter the following error:
Error: Unable to load http://localhost/Services/DocumentSearch/DocumentSearch.svc status: s:9
(Internal query execution timeout (180 seconds) exceeded - Entity ID: 1, Project ID: 1, User ID: 1)
Description:
A PaperVision Enterprise search can make many passes through the database before it's able to either return a full page of results or finish looking through all of the documents in the system. This process can be slowed by a large amount of documents, document security levels, or performance concerns on the database server itself. In PaperVision Enterprise R86, an internal timeout of 180 seconds was added to cut searches off in these extreme circumstances. Optionally, users can configure this timeout, as well as the maximum number of queries which can be executed to fulfill a single search request.
To set these variables, users can add rows to the PVDM_SYS_SYSTEM table in the PaperVision Enterprise SQL database representing the following values:
- DOCSEARCHMAXITERATIONSEC - This is the time-based timeout (in seconds) as seen in the error above. The default value if not set is 180.
- DOCSEARCHMAXITERATIONCOUNT - This controls the maximum amount of queries a single search can execute. The default value if not set is 0, which disables this functionality.
For example, if you wanted to double the default timeout value, you could execute the following SQL query:
IF EXISTS (SELECT 1 FROM PVDM_SYS_SYSTEM WHERE VARNAME = 'DOCSEARCHMAXITERATIONSEC')
UPDATE PVDM_SYS_SYSTEM SET VARVALUE = '360' WHERE VARNAME = 'DOCSEARCHMAXITERATIONSEC'
ELSE
INSERT INTO PVDM_SYS_SYSTEM (VARNAME, VARVALUE) VALUES ('DOCSEARCHMAXITERATIONSEC', '360')