In a Microsoft Exchange Server 2016 environment, users experience the following behavior when a FindItems operation is performed in Exchange Web Services (EWS) calls:
The EWS call fails with the following error:
Unhandled Exception: Microsoft.Exchange.WebServices.Data.ServiceResponseException: An internal server error occurred. The operation failed., Cannot query rows in a table.
The EWS logs in C:\Program Files\Microsoft\Exchange Server\V15\Logging\Ews on the mailbox role server show the following error:
ExceptionHandler_Execute=Microsoft.Exchange.Data.Storage.StoragePermanentException: Cannot query rows in a table. ---> Microsoft.Mapi.MapiExceptionMaxObjsExceeded: MapiExceptionMaxObjsExceeded: Unable to query table rows.
A change in the number of materialized restrictions that can exist in a mailbox was introduced in Exchange Server 2016. This change may trigger a situation where a FindItems call must create a new materialized search in the mailbox but cannot do so because the mailbox is already at the limit.
To resolve the issue, install Exchange Server 2016 Cumulative Update 3 or later. In the scenario that's described in the "Symptoms" section, the oldest materialized search will be aged out after you install this update. Therefore, a new search can be created without generating an exception.