ITADN

System.ObjectDisposedException: The CancellationTokenSource has been disposed in GlobalEndpointManager

#5808Openruodanxie 创建于 2026-04-23
needs-investigationcustomer-reported
R
ruodanxiecommented
**Describe the bug** Our service which are using Cosmos DB SDK encountered an exception as follows: System.ObjectDisposedException: The CancellationTokenSource has been disposed. at System.Threading.CancellationTokenSource.Cancel() at Microsoft.Azure.Cosmos.Routing.GlobalEndpointManager.GetAccountPropertiesHelper.GetAndUpdateAccountPropertiesAsync(Uri endpoint) at Microsoft.Azure.Cosmos.Routing.GlobalEndpointManager.GetAccountPropertiesHelper.TryGetAccountPropertiesFromAllLocationsAsync() This exception has been intermittently happened for quite a while. **Expected behavior** Cosmos DB should handle this exception properly. **Environment summary** SDK Version: Microsoft.Azure.Cosmos 3.46.1 OS Version: Linux, mcr.microsoft.com/dotnet/runtime:8.0-azurelinux3.0-distroless
2 条评论