MicrosoftLearning / dp-420-cosmos-db-dev

DP-420: Designing and Implementing Cloud-Native Applications Using Microsoft Azure Cosmos DB
https://microsoftlearning.github.io/dp-420-cosmos-db-dev/
MIT License
81 stars 95 forks source link

Data seeding issues in 16-measure-performance - RU's exceeded #58

Closed verydarkmagic closed 5 months ago

verydarkmagic commented 5 months ago

Module: 16

Lab/Demo: 16

Task: Prepare your development environment

Step: 07

Running the data seeding code always throws an exception about exceeded RU's, even though the container provisioned throughput is max (4000). I think this is because seeding mechanism does not have throttling and my computer is very fast (m3 pro chipset).

The data creating app also has no idempotency, fault handling or retry logic, so after every run I have to manually delete the containers from the database before I can retry, which is very annoying.

Repro steps:

  1. Follow the instructions precisely
  2. Running dotnet run --load-data always throws exception :

    Unhandled exception. Microsoft.Azure.Cosmos.CosmosException : Response status code does not indicate success: TooManyRequests (429); Substatus: 3200; ActivityId: 31389630-7b5b-446c-8891-d7a0a8222ab0; Reason: ( Errors : [ "Request rate is large. More Request Units may be needed, so no changes were made. Please retry this request later. Learn more: http://aka.ms/cosmosdb-error-429" ] );

MScalopez commented 5 months ago

@verydarkmagic, sorry you are having these issues. In the next few months we will be updating these labs and I will make sure we increase the throughput of the containers deployed. In the mean time, you could update the azuredeploy.json file, lines 21 and 22, and change the value from 4,000 to 10,000. Note that the same changes can be done on lab 17.

verydarkmagic commented 5 months ago

Thank you for response. I have worked around the issue by decreasing parallelization.

I must say I find it a little confusing that the issue is closed as "completed" when it is, in fact, not completed.