Search code examples
pythonazure-cosmosdbazure-cosmosdb-mongoapi

Cosmos DB maximum file size limit 1.5MB


I'm trying to update a json file in an azure cosmos database using pymongo's update_one/update_many methods.
I'm get an error code 17419 (Resulting document after update is larger than x)
According to the azure cosmos db documentation, the file size limit is 2MB, but my file is now 1.498MB and the data i'm trying to insert is nowhere near 0.5MB (it's only 49.5kB) and 1.5 + 0.049 < 2 for as far as I know...

Am I missing something?


Solution

  • Based on the document,2 mb limitation is directed against request,not only for file.

    enter image description here

    CRUD request contains not only file data, but also headers and so on. So,i'm afraid that your update request is over 2 mb,though your file data is below 2 mb. You could try to catch the size of your request with Fiddler tool so that you could troubleshooting the cause of it.