5

I'm looking to write a scaled out SignalR application using SQL Server, using this article as a guidline. After doing some testing, it looks like the table Messages_0 in the SignalR database that I created (per the article) could get pretty big.

What I'm wondering is, how often can this data be cleared out? I see there is an InsertedOn column so I would think after day or two the data wouldn't be relevant anymore. Is there any documentation or guidelines on this?

I'm wondering if I could just set up a job that would clear out anything older than a week just to prevent the table from getting too big over time.

lhan
  • 4,585
  • 11
  • 60
  • 105

2 Answers2

7

I was looking for the same thing, and I did read the suggestion in the documentation, but I was wondering if SignalR would clean up by itself in that case, and when.

I found the answer here: How to cleanup SignalR SQL database Which points to the github repository, where you can see how SignalR automatically cleans the tables when reaching a hardcoded limit. See github code here: SignalR SQL automatical clean-up

Thought it might be useful to add to this question, for anyone searching the same question.

Baz
  • 199
  • 2
  • 5
3

The documentation seems to suggest (albeit briefly), that you should not delete rows yourself.

SignalR manages the tables. As long as your application is deployed, don't delete rows, modify the table, and so forth.

Take a look at: Scaleout With SignalR - asp.net

Grant H.
  • 3,689
  • 2
  • 35
  • 53
  • 2
    oh wow - in the same article I linked to. Apparently I should read the full article before asking my questions. Thank you! – lhan Nov 03 '14 at 13:59