title: Blazor Connection Disconnected
body: <p>I have a web app with Client running on Blazor Server. I have set a custom Blazor reconnect modal (<code>&lt;div id=&quot;components-reconnect-modal&quot;...</code>) as the documentation says here - <a href="https://docs.microsoft.com/en-us/aspnet/core/blazor/fundamentals/signalr?view=aspnetcore-3.1&amp;pivots=server" rel="noreferrer">Microsoft Docs</a></p>
  <p>Also I have these settings for SignalR and Blazor circuits:</p>
  <pre><code>    services.AddServerSideBlazor
          (options =&gt;
          {
              options.DisconnectedCircuitMaxRetained = 100;
              options.DisconnectedCircuitRetentionPeriod = TimeSpan.FromMinutes(5);
              options.JSInteropDefaultCallTimeout = TimeSpan.FromMinutes(1);
              options.MaxBufferedUnacknowledgedRenderBatches = 10;
          })
          .AddHubOptions(options =&gt;
          {
              options.ClientTimeoutInterval = TimeSpan.FromSeconds(30);
              options.EnableDetailedErrors = false;
              options.HandshakeTimeout = TimeSpan.FromSeconds(15);
              options.KeepAliveInterval = TimeSpan.FromSeconds(15);
              options.MaximumReceiveMessageSize = 32 * 1024;
              options.StreamBufferCapacity = 10;
          });
  </code></pre>
  <p>But I have an annoying problem - Whenever the app is open in a browser tab and stays still with nobody using it it disconnects. It happens very inconsistently and I can't locate the configuration for these custom time periods but I need to enlarge them. Example:</p>
  <ol>
  <li>Initialy loaded the app at 11:34:24AM</li>
  <li>Leave it like that for a while</li>
  <li>In the Console: &quot;Information: Connection disconnected.&quot; at 11:55:48AM and my reconnect-modal appears.</li>
  </ol>
  <p>How can I enlarge the lifetime of the connection so that it is always bigger than my session timeout. I checked the Private Memory Limit of my app pool but it is unlimited. It happens really inconsistently with the same steps to reproduce. Test 1 - 16 mins 20 sec; Test 2 - 21 mins 58 sec; Test 3 - 34 mins 56 sec...and then after iisreset...Test 4 - 6 mins 28 sec</p>
  <p>Please help.</p>