Last post Apr 11, 2016 07:06 AM by BradSymons
Apr 08, 2016 02:25 PM|BradSymons|LINK
We have developed a selfhost signalR web chat server running as a windows service.
We have recently been doing performance testing and have picked up an issue with the memory.
In our test scenario, we have 50 "agents" who can accept up to 2 chat sessions. (The incoming/outgoing "customer" messages go through a web service).
So at any one point in time we have around a total of 150 connections (agent main connection plus 2 chat sessions each) and a connection that is created and disposed of each time a "customer" message is sent.
Messages sent form the agent to the customer are done with a service call from the chat hub.
In our performance test, about 800 messages are sent an hour. (about 182 a minute)
The problem we are seeing, is when we run our performance test over a couple of hours, the memory usage of the service just keeps growing.
We have monitored the memory using DOTMemory and observed the following.
The objects that seem to be holding the most memory are:
Microsoft.Aspnet.SignalR.Messaging.Topic -> MessageStore->Message ->Message -> System.Byte
We do not send any massive messages with attachments or anything (yet), our max message lenght is 600 chars.
Is there something we need to be doing to make sure the message-store is recycled correctly or is this a know bug in SignalR?
Thanks in Advance.
Apr 11, 2016 04:51 AM|Fei Han - MSFT|LINK
I’d like to know the size of the message are sent between hub and clients. As far as I know, if large messages are being used, this may create memory issues. You could try to reduce message size and check if it will still create memory issue.
Apr 11, 2016 07:06 AM|BradSymons|LINK
Hi Fei Han
The messages are small, our maximum messages size is 600 characters, but most are much smaller than that.