azure-cosmos-db-emulator-docker
azure-cosmos-db-emulator-docker copied to clipboard
Emulator Container Limit
So the documentation says this:
The emulator only supports up to 10 fixed-size containers at 400 RU/s or 5 unlimited-size containers.
What does that mean? 10 containers per database? Or 10 containers spread between all databases? What if I need more than 10 containers? Also, I can certainly create more than 10 containers, the emulator itself never stops you or say anything about it, what is supposed to happen if I go over the limit?
I just started playing with the emulator and would love to know how you got past the 10 container limit (which seems to be regardless of how many databases you have). I can't create an 11th container via the python sdk or the emulator's web interface. Both return a depressingly generic message: Sorry, we are currently experiencing high demand in this region South Central US, and cannot fulfill your request at this time
I'm a bit baffled as to why there would be a limit like this.
I never got this message, I currently have 12 containers running on my emulator, so I don't know what to tell you. I'm using the latest docker image under WSL2. I only use the web interface for container management.
And yeah, I also can't believe they would put a limit to that. How do they expect people to develop? It feels like they simply want to push us to pay for the cloud version for developing which is just painful. Not only because of the price, but latency and also a bunch of devs messing up with databases at the same time.
Honestly, for a paid product provided by a company this big, I've had such a terrible experience working with it. If it was my call, I'd have moved on to other services.
+1, I'm very confused how we're supposed to set up a strong developer experience for local development with only 10.
Try starting cosmosDB emulator with the argument PartitionCount, e.g. .\Microsoft.Azure.Cosmos.Emulator.exe /PartitionCount=60
. You may need to delete your database/setup first for this to be applied.
Since the official Azure docs say there is a limit of 10 containers, I'm hesitant to move our entire team (and, if tests went well, our entire company) to a local development setup that relies on a limitation in the docs that is not enforced.
Below line is from the above linked doc at time of writing:
The emulator only supports up to 10 fixed-size containers at 400 RU/s or 5 unlimited-size containers.
The default limit for partitions in the Windows emulator (non-docker) is 25, but this can be extended to 250 by including the argument /PartitionCount=250
. Similarly, the Linux Docker emulator supports 10 partitions by default, but this limit can also be raised to 250 using the environment variable AZURE_COSMOS_EMULATOR_PARTITION_COUNT=250
.
It's worth noting that the concept of unlimited-size containers is outdated and no longer applicable in the CosmosDB emulator. We'll ensure this information is updated in the documentation accordingly.
Is there any limitation in the amount of databases per server?
The emulator is unusable for me using the docker version. As soon as I create 8 or 9 containers during integration tests it breaks. I'm wondering if it's due to the amount of containers.
It's just awfully unreliable. If I could, I would ditch CosmosDb altogether due to poor DevEx.
Hi @diegosasw, are you using the windows docker or the linux docker?
@amanrao23 the linux docker container. With the Windows emulator (windows installation, not the container) it handles things a bit better. Tested it with https://github.com/diegosasw/cosmosdb-sample/tree/6efe71ed676bf86eabac3341b962db339709f91a
@diegosasw the maximum number of containers in the emulator depend on PARTITION_COUNT and the RU allocated for each container. Read this comment for more info. Let us know if you are still not able to create more containers.