0

I am inserting 80 record/sec to DocumentDB using C#. Everything works well but somehow my server CPU usage reach to 90% and it crashes application.

I have taken care of everything which includes, Singleton DocumentClient, Indexing, Throughput limit, Direct connection mode, TCP connection, retry policy, open connection safely before first request.

Any one have idea on this?

DSA
  • 720
  • 2
  • 9
  • 30
  • Is it 90% of the server that you are calling CosmosDB from OR is it 90% of your OfferThroughput/RequestUnits as reported by the Azure portal? Are you getting throttled by CosmosDB? – Ralph Willgoss Dec 07 '17 at 18:37
  • @RalphWillgoss It is 90% of server. I have properly follow azure guidelines to take care of Throughput. No throttled by CosmosDB but application crash happens due to high CPU usage of server. – DSA Dec 08 '17 at 04:22
  • 1
    can you please share your source code? – Aravind Krishna R. Dec 08 '17 at 04:25
  • @AravindKrishnaR. It's just singleton DocumentClient object with Task.Run execution (with sample json). No extra code is written over there. – DSA Dec 08 '17 at 04:29
  • If you could post your code, then I can test against my own CosmosDB. Do you get the same result if you run the app locally and target the Emulator? – Ralph Willgoss Dec 09 '17 at 14:37

1 Answers1

-1

Have you followed the performance tips listed here: http://azure.microsoft.com/blog/2015/01/20/performance-tips-for-azure-documentdb-part-1-2/ and http://azure.microsoft.com/blog/2015/01/27/performance-tips-for-azure-documentdb-part-2/? You should see a performance of < 10 ms on writes with DocumentDB aside from network latency of your connection.

Reference: Fastest way to insert 100,000+ records into DocumentDB

  • Yes I have follow those guidelines, otherwise I want be able to dump 80 records / sec with 400 Throughput (5 throughput / record). – DSA Dec 08 '17 at 04:24