Error writing to cosmosdb sink

Scott Alvis 1 Reputation point
2021-05-19T04:47:42.977+00:00

I'm getting the following error trying to write to a cosmosdb sink. I've tried decreasing the batch size to 1 and the problem persists. Any thoughts on how to solve this problem?

Thank you!

{
"StatusCode": "DFExecutorUserError",
"Message": "Job failed due to reason: Errors encountered in bulk import API execution. PartitionKeyDefinition: {\"paths\":[\"/product_id\"],\"kind\":\"Hash\"}, Number of failures corresponding to exception of type: com.microsoft.azure.documentdb.DocumentClientException = 1; FAILURE: com.microsoft.azure.documentdb.DocumentClientException: {\"Errors\":[\"Request size is too large\"]}\nActivityId: 6efc5f73-b85b-11eb-a5d6-8560775d5c0f, Request URI: /apps/837b86bc-7029-4526-9f8c-86dc293a7b49/services/d8ea2608-02d9-4bbd-bf9b-04341fac787a/partitions/8ee291e7-b52f-4e2c-bf24-115193243591/replicas/132657744298919356p//, StatusCode: RequestEntityTooLarge, SubStatusCode: , \nRequestStartTimeUTC: \"19 May 2021 04:34:00.850\", RequestEndTimeUTC: \"19 May 2021 04:34:00.911\", Number of regions attempted: 1\nStoreResponseStatistics{requestStartTimeUTC=\"19 May 2021 04:34:00.850\", requestResponseTimeUTC=\"19 May 2021 04:34:00.911\", storeReadResult=StoreReadResult{statusCode=413, storePhysicalAddress=https://cdb-ms-prod-eastus2-fd4.documents.azure.com:14612/a",
"Details": "Errors encountered in bulk import API execution. PartitionKeyDefinition: {\"paths\":[\"/product_id\"],\"kind\":\"Hash\"}, Number of failures corresponding to exception of type: com.microsoft.azure.documentdb.DocumentClientException = 1; FAILURE: com.microsoft.azure.documentdb.DocumentClientException: {\"Errors\":[\"Request size is too large\"]}\nActivityId: 6efc5f73-b85b-11eb-a5d6-8560775d5c0f, Request URI: /apps/837b86bc-7029-4526-9f8c-86dc293a7b49/services/d8ea2608-02d9-4bbd-bf9b-04341fac787a/partitions/8ee291e7-b52f-4e2c-bf24-115193243591/replicas/132657744298919356p//, StatusCode: RequestEntityTooLarge, SubStatusCode: , \nRequestStartTimeUTC: \"19 May 2021 04:34:00.850\", RequestEndTimeUTC: \"19 May 2021 04:34:00.911\", Number of regions attempted: 1\nStoreResponseStatistics{requestStartTimeUTC=\"19 May 2021 04:34:00.850\", requestResponseTimeUTC=\"19 May 2021 04:34:00.911\", storeReadResult=StoreReadResult{statusCode=413, storePhysicalAddress=https://cdb-ms-prod-eastus2-fd4.documents.azure.com:14612/apps/837b86bc-7029-4526-9f8"
}

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,699 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,003 questions
{count} votes

2 answers

Sort by: Most helpful
  1. HimanshuSinha-msft 19,476 Reputation points Microsoft Employee
    2021-05-19T21:34:49.98+00:00

    Hello @Scott Alvis ,
    Thanks for the ask and using the Microsoft Q&A platform .
    Since you have not mentioned what is the source , I am assumeing that you may be hitting anyone of the limits called out here

    98014-image.png

    Please do let me know how it goes .
    Thanks
    Himanshu
    Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members

    0 comments No comments

  2. Hao Huancheng 1 Reputation point
    2021-09-16T03:54:14.523+00:00

    sizeissmall
    The size of 2MB is small , Can it be adjusted to 10MB in the future?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.