Skip to content

System.ObjectDisposedException: The CancellationTokenSource has been disposed in GlobalEndpointManager #5808

@ruodanxie

Description

@ruodanxie

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions