简体   繁体   中英

I am getting Command find failed: Error=16500, RetryAfterMs=64, Error while Fetching Record Count in Azure Cosmos Db

i am fetching total number of count(near about 1500 record) from azure cosmosdb and its giving me following error

Error Detail

here is my code

Code Detail

getCountFilter = getCountBuilder.Eq("business_id", usermodel[0].business_id) & getCountBuilder.In("user_id", userlist) & getCountBuilder.Eq("status", 1);
                    getAllCountForApproved = getleavebyidconnection.GetFilteredCount(getCountFilter);
     public virtual long GetFilteredCount(FilterDefinition<T> filter = null)
            {
                if (filter == null)
                {
                    return collection.Count((FilterDefinition<T>.Empty));
                }
                else
                {

                    return collection.Count(filter);
                }
            }

i want a count only , if count is less its work fine but if count is more then thousand(1000) its give me error

can some one help me

Based onhttps://docs.microsoft.com/azure/cosmos-db/mongodb-troubleshoot :

The error code means:

The total number of request units consumed is more than the provisioned request-unit rate for the collection and has been throttled.

Consider scaling the throughput assigned to a container or a set of containers from the Azure portal or you can retry the operation.

The RetryAfterMs is the milliseconds you have to wait in order to retry the operation based on your provisioned RU/s .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM