We were load testing an Azure queue using multiple processes. We noticed that all of the machines would simultaneously pause while sending messages to the queue.
The pauses are of different length. Most frequent are half second pauses, but we've seen pauses on all senders up to a hand-full of seconds.
Since I originally posted, we've seen the same behavior with a Java client using the HTTP bindings.
Additionally, we've seen pauses which affect every instance except one. While several of the executing programs will stop simultaneously, one will continue to send at the same rate.
In all cases, after the pause is over, we see all of the instances resume at the old rate. We start all the instances by hand over a period of several seconds.
The .NET code looks like:
using (var memoryStream = new MemoryStream())
{
using (var streamWriter = new StreamWriter(memoryStream))
{
streamWriter.Write(messageText);
streamWriter.Flush();
memoryStream.Position = 0;
var message = new BrokeredMessage(memoryStream, false);
message.Properties["Name"] = "DeviceStatusProbed";
message.Properties["MessageId"] = messageIdText;
sender.SendAsync(message);
if (messageNumber == 0)
{
stopwatch.Start();
}
messageNumber++;
Console.WriteLine("MPS: " + 1000 * messageNumber / (double)stopwatch.ElapsedMilliseconds);
Console.WriteLine("Sent message with MessageID = " + message.MessageId);
}
}
What are the potential causes in the Azure environment for such freezes? If the cause isn't expected, is there tooling or guidance available to help us determine the cause?
Thanks.