High CPU usage when using the automatic tuning feature

Marcin Dolinski 0 Reputation points
2025-11-19T14:29:33.5533333+00:00

I noticed a few times since the automatic tuning has been enabled on different databases (two different SQL Server instances) that CPU consumption has hit 100%.

The first occurrence ended up with lots of errors "A time out occurred while waiting to optimize the query. Rerun the query." without any specific reason for the issue start.

The second one happened just after backing up the transaction logs

In both cases, the high CPU usage lasted unit I disabled the automatic tuning for the database.

What is also common for both occurrences is also the error I saw in logs:

"The Service Broker endpoint is in disabled or stopped state."

and also some errors about denied access to some .NET DLLs.

Do you know if I'm missing any configuration? Is that a known issue? How to avoid it?

SQL Server Database Engine
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2025-11-19T14:30:12.3333333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    High CPU usage when using the automatic tuning feature in SQL Server can occur due to several factors, including the nature of the queries being optimized and the system's overall workload. Here are some considerations and steps you can take to address the issue:

    1. Query Optimization: Automatic tuning may lead to changes in query execution plans that could inadvertently increase CPU usage. If the automatic tuning feature is causing performance issues, you might want to review the execution plans of the queries that are timing out or consuming high CPU.
    2. Service Broker Endpoint: The error message regarding the Service Broker endpoint being in a disabled or stopped state suggests that there might be issues with messaging or background processing that could affect performance. Ensure that the Service Broker is properly configured and enabled if your application relies on it.
    3. Access Denied Errors: The errors about denied access to .NET DLLs could indicate permission issues that might affect the execution of certain queries or processes. Verify that the SQL Server service account has the necessary permissions to access these resources.
    4. Monitoring and Logging: Utilize SQL Server's monitoring tools to log CPU usage and query performance over time. This can help identify patterns or specific queries that are causing spikes in CPU usage.
    5. Disabling Automatic Tuning: If disabling automatic tuning resolves the CPU issues, consider managing index tuning and query optimization manually. This allows for more control over how changes are applied to your database.
    6. Consult Documentation: Check the official Microsoft documentation for any known issues related to automatic tuning and high CPU usage. There may be specific configurations or updates that address your situation.

    If these issues persist, it may be beneficial to engage with Microsoft support or consult the SQL Server community for further insights.


    References:


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.