SignalR/SignalR · error · ArgumentOutOfRangeException
value
Error message
value
What it means
ArgumentOutOfRangeException on the TableCount setter: the SQL backplane needs at least one message table, so any value < 1 is rejected. TableCount controls how many Messages_N tables are created to reduce lock contention across farm nodes.
Source
Thrown at src/Microsoft.AspNet.SignalR.SqlServer/SqlScaleoutConfiguration.cs:46
/// </summary>
public string ConnectionString { get; private set; }
/// <summary>
/// The number of tables to store messages in. Using more tables reduces lock contention and may increase throughput.
/// This must be consistent between all nodes in the web farm.
/// Defaults to 1.
/// </summary>
public int TableCount
{
get
{
return _tableCount;
}
set
{
if (value < 1)
{
throw new ArgumentOutOfRangeException("value");
}
_tableCount = value;
}
}
}
}
View on GitHub (pinned to 693053b89a)
Solutions
- Set TableCount to a positive integer (1 is the default and minimum).
- Clamp any computed value to at least 1 before assigning.
- Validate the config-sourced value at startup.
Example fix
// before config.TableCount = desiredTables; // desiredTables is 0 -> throw // after config.TableCount = Math.Max(1, desiredTables);
Defensive patterns
Strategy: validation
Validate before calling
int tableCount = Math.Max(1, desiredTableCount); config.TableCount = tableCount;
Prevention
- Clamp any computed TableCount to at least 1.
- Default config-sourced values to 1, not 0.
- Validate the setting at startup before it reaches the setter.
When it happens
Trigger: config.TableCount = 0 (or any negative value) is assigned, hitting the guard at SqlScaleoutConfiguration.cs:46.
Common situations: TableCount is read from a config setting that defaults to 0; a calculation that can yield zero (e.g. based on CPU/instance count) is wired into TableCount; an off-by-one when scaling down.
Related errors
- configuration
- connectionString
- SignalR: Invalid transport(s) specified, aborting start.
- Query string property must be either a string or object.
- Value must be greater than zero.
AI-assisted analysis of SignalR/SignalR@693053b89a (2026-08-13).
Data as JSON: /api/errors/159bd1cbfbf939ef.
Report an issue: GitHub.