Cosmos DB - Failed to change the ID after it has exceeded 300 characters.

Jess 96 Reputation points
2023-03-24T07:58:54.4666667+00:00

On 2023-03-23, we create a new CosmosDB Account. And then we found something wrong.

Failed to change the ID after it has exceeded 300 characters.

  1. we change the ID of the data to one over 300 characters. it succeeded
  2. After that, failed to change the ID again whatever the length is.

What happens in the new CosmosDB Account, isn't the limitation 1024 characters?

User's image

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,459 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. GeethaThatipatri-MSFT 27,877 Reputation points Microsoft Employee
    2023-03-24T19:05:31.7433333+00:00

    Hi, @Jess Thanks for posting your question in the Microsoft Q&A forum.

    The limit is 1023 bytes, not characters as per Service quotas and default limits - Azure Cosmos DB | Microsoft Learn. Can you please tell me what you are storing in the ID field that it needs to be this long? Other fields (except for id and partition key) do not have length limitations, so if you really do need to store something extremely long, you should put it in a different field.

    Regards

    Geetha


  2. Jess 96 Reputation points
    2023-04-05T06:47:45.64+00:00

    User's image

    Failed to read item replace_with_new_document_idreplace_with_new_document_idreplace_with_new_document_idreplace_with_new_document_idreplace_with_new_document_idreplace_with_new_document_idreplace_with_new_document_idreplace_with_new_document_idreplace_with_new_document_idreplace_with_new_document_idreplace_with_new_document_idreplace_with_new_document_id: Error sending request: Failed to fetch
    

    The length of the ID is 336. @GeethaThatipatri-MSFT @Sajeetharan

    0 comments No comments