KB5001045 - FIX: Memory grant wait times out when you run many Columnstore bulk inserts concurrently in SQL Server 2017

Work anywhere from any device with Microsoft 365

Upgrade to Microsoft 365 to work anywhere with the latest features and updates.

Upgrade now

Symptoms

When you run many Clustered Columnstore bulk inserts concurrently in Microsoft SQL Server 2017 on a computer that has insufficient memory, you may receive a memory grant time-out error.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More information

Column store bulk insert queries might require lots of memory for the column store insert operator and any other memory-consuming operators in the query, such as sort.

By default, SQL Server waits for 25 seconds to get the memory grant. If a bulk insert still cannot get necessary memory, it will fall back to trickle insert to make sure that queries can progress. (For more information about trickle inserts, see Columnstore indexes - Data loading guidance).

However, this occurs only when the number of active sessions with a memory grant in the current resource pool is less than a particular threshold value that is proportional to the number of logical cores. If the number of such concurrent sessions is too high, the bulk insert query might fail and generate a memory grant time-out error after 25 seconds. This may create unexpected issues for the data loading applications. This update changes how a bulk insert waits for a memory grant. The insert will now use a time-out value that's calculated similarly to any other kind of query.

Resolution

This problem is fixed in the following cumulative update for SQL Server:

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:

References

Learn about the terminology that Microsoft uses to describe software updates.

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.

×