Why is my Worker Role with TCP endpoint only processing one connection at a time?

What I have

I have a cloud service with a Worker Role who uses a TCP/IP endpoint.  This service hosts one of my .dll logic libraries to run code against a Azure SQL database I  have hosted.  Everything is up and running fine.  I manually create my own logs and I have verbose logging turned on as well.

What I do

Recently I tried to do a load test by spawning threads in a for loop.  I used a long running process (5+ seconds) and have a new thread kick off every 50 milliseconds. 

Where I am

I have logs set up in my worker role which record each access.  I record the start and end time of each call.  For whatever reason the first 2 calls seem to be asynchronous, but after that one call doesn't start until the call before it ends, which takes about 5 seconds per call.

Also, when I look at my service dashboard I can only see processing time.  I would like to see the number of connections and other data about the service.  

How to help

Any specific information you can give to guide me would be greatly appreciated as would relevant up to date online resources.  One problem with online information on Azure is that I've found a number of outdated resources or pages that were removed and only link to other pages that were removed.  

My Custom Logs

Logs are ordered by timestamp, and I would expect them to be 50 milliseconds apart, not 5 seconds apart.  Also, at this time I don't know why some calls are made is less time than the code took to run.

Call Start Call End TimeTotal
14/9/2015 15:10:17 14/9/2015 15:10:28 0.859028
14/9/2015 15:10:17 14/9/2015 15:10:30 0.824306
14/9/2015 15:10:36 14/9/2015 15:10:42 0.861806
14/9/2015 15:10:42 14/9/2015 15:10:47 0.593056
14/9/2015 15:10:47 14/9/2015 15:10:54 0.527778
14/9/2015 15:10:54 14/9/2015 15:11:00 0.727083
14/9/2015 15:11:00 14/9/2015 15:11:04 0.752778
14/9/2015 15:11:04 14/9/2015 15:11:12 0.383333
14/9/2015 15:11:12 14/9/2015 15:11:17 0.810417
14/9/2015 15:11:17 14/9/2015 15:11:22 0.3625
14/9/2015 15:11:22 14/9/2015 15:11:28 0.761111
14/9/2015 15:11:28 14/9/2015 15:11:33 0.55625
14/9/2015 15:11:33 14/9/2015 15:11:39 0.425694
14/9/2015 15:11:39 14/9/2015 15:11:44 05:055
14/9/2015 15:11:44 14/9/2015 15:11:49 0.540278
14/9/2015 15:11:49 14/9/2015 15:11:55 0.806944
14/9/2015 15:11:55 14/9/2015 15:12:02 0.805556
14/9/2015 15:12:02 14/9/2015 15:12:08 0.658333
14/9/2015 15:12:08 14/9/2015 15:12:14 0.865278
14/9/2015 15:12:14 14/9/2015 15:12:19 0.359028
14/9/2015 15:12:19 14/9/2015 15:12:24 0.833333


  • Edited by heegar 15 hours 58 minutes ago updated my logs
September 14th, 2015 10:56am

Could you please show us some sample code of how you connect to your service. The problem doesn't have to be server side. For instance if you use the same client connection in multiple threads, it will also just use one server connection (and since there is just one connection, processing goes one at a time).

Also, is the problem Azure specific? Can you run your worker locally with multiple threads?

Free Windows Admin Tool Kit Click here and download it now
September 14th, 2015 12:26pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics