Skip to content

With Redis scale-out, once Send() method runs into an error, the stream will never be opened again until Redis is restarted #3093

@Xiaohongt

Description

@Xiaohongt

With Redis scale-out, once Send() method runs into an error, if the instance doesn't receive any message, then in the instance the stream will never be opened again until Redis is restarted. No connections in the instance can send a message. Instead they return the same error. Restarting Redis fixes the issue.

Repro steps:

1). Use AspNet SignalR sample, update it to use Redis scale-out, just let one web app use the Redis, start the Redis
2). Since the issue not easy to repro, I add below code in the RedisMessageBus.Send() method to throw when message contains “throw”:

        protected override Task Send(int streamIndex, IList<Message> messages)
        {
            var message = messages[0].GetString();
            if (message.Contains("throw"))
            {
                throw new Exception("Verify Throwing an exception from Send()");
            } 
            . . . . . . 
        }

3). Browse to Hubs/HubConnectionAPI/Default.aspx page
4). Input "throw" in "To Everybody" textbox, Click button "Broadcast". This will cause Send method throw.
5). Input "aaaa" in "To Everybody" textbox, Click button "Broadcast". Observe " Error: Verify Throwing an exception from Send()"
6). Wait for 1 minute or more, click "Broadcast" button again, Repeat this step several times.

Expected result:

Like SB scale-out /SqlServer scale-out, "Broadcast" can send the messages successfully.

Actual result:

"Error: Verify Throwing an exception from Send()" was always thrown for sending the messages which should not cause Send method throw in step (6).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions