Hi @Michael Hlavinka
Thank you for posting your question in the Microsoft Q&A forum.
Please note that our forum is a public platform, and we will modify your question to hide your personal information in the description. Kindly ensure that you hide any personal or organizational information the next time you post an error or other details to protect personal data.
The error message "The Execute method of job definition Microsoft.Office.Server.Search.Administration.QueryLogJobDefinition threw an exception. Timeout expired. The timeout period elapsed prior to obtaining a connection from the pool" indicates that the Query Logging Timer Job is exhausting the SQL connection pool. This occurs when all pooled connections are in use and the maximum pool size has been reached.
The pattern you observed suggests connection leaks or unreleased connections in the Search Query Logging component. This issue appears to have been introduced or exposed by the July 2025 Cumulative Update for SharePoint Server Subscription Edition.
The July 2025 CU appears to have introduced major security enhancements along with changes in ASP.NET machine key handling and search-related components. These internal modifications seem to have influenced how QueryLogJobDefinition interacts with SQL Server, potentially contributing to connection pooling issues under specific conditions.
Currently, there is no official fix or KB article addressing this behavior, but the SharePoint product team is investigating. In the meantime, you can try the following workarounds:
-Increase SQL Connection Pool Size Modify the connection string for the Search Service Application database to increase the maximum pool size. The default is 100, but you can try raising it to 200 or 300. Please note this may only delay the issue if a connection leak is present.
Reference: Seeing connection time out error due to "max pool size was reached" when using Microsoft.Data.SqlCl….
-Set up a scheduled task to restart the SharePoint Timer Service (SPTimerV4) daily or every 48 hours. This helps clear stale connections and reduce pressure on the pool
-If query logs are not essential, you can disable the Query Logging Timer Job in Central Administration.
Reference: Enable query logging in SharePoint Server - SharePoint Server | Microsoft Learn.
I hope this information is helpful.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.