40501: The service is currently busy. Retry the request after 10 seconds(服务当前繁忙。请在 10 秒后重试请求)
SQL Server含义
在 Azure SQL Database 中,服务因资源压力(引擎限流)暂时拒绝了请求。系统繁忙,客户端应稍后重试。
原因
CPU、连接、事务日志写入速率或工作线程数等资源达到所选服务层级(DTU/vCore)的上限;负载突增;或长时间运行/低效的查询消耗了资源。错误附带的 'reason code' 指明了被限流的是哪种资源。
解决方法
在应用中实现指数退避重试逻辑;这是处理暂时性错误的预期方式。检查资源使用情况:sys.dm_db_resource_stats 和 Azure 门户指标。优化查询/索引,减少不必要的并发。如果资源持续饱和,提升服务层级(DTU/vCore)。
同一数据库的其他条目
- 605Attempt to fetch logical page belongs to a different allocation unit(尝试获取的逻辑页属于另一个分配单元)
- 4922ALTER TABLE ALTER COLUMN failed because one or more objects access this column(ALTER TABLE ALTER COLUMN 失败,因为有一个或多个对象访问此列)
- 7202Could not find server 'name' in sys.servers(在 sys.servers 中找不到服务器 'name')
- 8645A time out occurred while waiting for memory resources to execute the query(等待执行查询所需的内存资源时超时)
- 8651Could not perform the operation because the requested memory grant was not available(无法执行操作,因为请求的内存授予不可用)
- 5061ALTER DATABASE failed because a lock could not be placed on database(ALTER DATABASE 失败,因为无法在数据库上加锁)
- 3702Cannot drop database because it is currently in use(无法删除数据库,因为它当前正在使用)