0

http://www.asp.net/signalr/overview/signalr-20/performance-and-scaling/scaleout-with-redis I followed this link to scaleout my simple signalr chat visual studio project.

I made my ubuntu virtual mchine on azure which runs redis.

I added GlobalHost.DependencyResolver.UseRedis("server", port, "password", "AppName"); to my startup class and right now I am only testing it on my machine , not other servers. But it does not work.

As soon as I put in that line my chat program gets stuck at line 1(see below) and never reaches line 2.

1)$.connection.hub.start().done(function () { 2) $('#sendmessage').click(function () { What am I doing wrong?

user3311298
  • 335
  • 5
  • 12

2 Answers2

0

It's best to setup server and client-side logging. This page details it http://www.asp.net/signalr/overview/signalr-20/performance-and-scaling/scaleout-in-signalr.

Let us know you're results and maybe we can help...

So after 2 months someone asked for more detail... so here's it copied and pasted

Enabling Tracing For SignalR Scaleout

To enable tracing for the backplanes, add the following sections to the web.config file, under the root configuration element:

<configuration>
  <system.diagnostics>
    <sources>
      <source name="SignalR.SqlMessageBus">
        <listeners>
          <add name="SignalR-Bus" />
        </listeners>
      </source>
      <source name="SignalR.ServiceBusMessageBus">
        <listeners>
          <add name="SignalR-Bus" />
        </listeners>
      </source>
      <source name="SignalR.ScaleoutMessageBus">
        <listeners>
          <add name="SignalR-Bus" />
        </listeners>
      </source>
    </sources>
    <switches>
      <add name="SignalRSwitch" value="Verbose" />
      <!-- Off, Critical, Error, Warning, Information, Verbose -->
    </switches>
    <sharedListeners>
      <add name="SignalR-Bus" 
          type="System.Diagnostics.TextWriterTraceListener" 
          initializeData="bus.log.txt" />
    </sharedListeners>
    <trace autoflush="true" />
  </system.diagnostics>
  . . .
</configuration>
penderi
  • 8,673
  • 5
  • 45
  • 62
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. – Wai Ha Lee Sep 17 '15 at 11:32
  • Hi, um that may be valid but this has been here for 2 months... it feels like someone's chasing SO rep... – penderi Sep 17 '15 at 12:25
  • A year and two months. It's entirely possible that somebody is going through your posts and flagging then as 'not an answer' where appropriate. If so, it's not me. Thanks for editing your answer, though. BTW, I don't gain any reputation by voting to delete answers. – Wai Ha Lee Sep 17 '15 at 12:33
0

You need to enable pub/sub channel on redis server. Steps:

  1. Open redis.windows.conf file
  2. Go to the Event notification section
  3. Add or uncomment notify-keyspace-events E
  4. Restart redis server.
amit
  • 406
  • 4
  • 6