Autogrow of file '******' in database '******' was cancelled by user or timed out after ****** milli

Autogrow of file 'XXXX' in database 'YYYY' was cancelled by user or timed out after ZZZZZ milliseconds

 

Consider the following scenario:

 

-       You have not configured the autogrow of your SQL Server files manually and instead rely on the default values.

-       While the database size is small you don’t face any strange behavior.

-       After the database reaches a big size you get hot by severe performance issues.

-       While checking the SQL ERRORLOG you see this error:

 

Autogrow of file 'XXXX' in database 'YYYY' was cancelled by user or timed out after ZZZZZ milliseconds

 

This happens because by default the autogrow of SQL Server data files is set to 10%. While this value is fine for small database sizes, it is certainly not recommended for large databases.

 

e.g. the 10% autogrow of a data file that is 100 GB is 10 GB

 

If at the time that the autogrow occurs, the workload on the hard disk is big and the autogrow is not successful within 30 seconds, the autogrow will fail. Then as more requests for data file space arrive, SQL Server will try to autogrow the file again and again and these requests will probably fail again after 30 seconds due to heavy workload.

 

So what can you really do in this case? Here are two solutions:

 

1.    Change the Autogrow setting from % to MB. A typical value for the Autogrow of files is e.g. 50 or 100 MB. This will prevent large Autogrow operations which may time out.

 

Or you may:

 

2.    Avoid using Autogrow and proactively (i.e. manually) expand the files to a big enough size during off-peak hours. This way you will also gain a performance benefit since no Autogrow operations will take place while normal SQL operation takes place.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值