If you see multiple query failures in the TEMS log indicating that a queryresponse failed with 1DE00040=KDE1_STC_RECEIVELIMITEXCEEDED it means that the query response was too large to fit in the TEMS buffer.
To fix this increase the response buffer size by adding a specification for KDCFC_RXLIMIT to the TEMS environment.
The default buffer size is 2M. To increase the buffer size to 8M change kmscms.ini and include the following:
[Override Local Settings]
This can also be added from the edit variables GUI.