dotnet/orleans · error · OrleansException

Failed to read Azure Storage table {TableName}

Error message

Failed to read Azure Storage table {TableName}

What it means

Thrown as an OrleansException that wraps the original exception when an Azure Table Storage read (ReadTableEntries/ReadAllEntries) fails and the failure is not classified as a 'data not found' condition. The original exception is preserved as the InnerException and a warning is logged via LogWarningReadTable before the rethrow. The finally block still runs CheckAlertSlowAccess, so slow-read metrics are recorded even on failure.

Source

Thrown at src/Azure/Shared/Storage/AzureTableDataManager.cs:552

                {
                    pageCount++;
                    results.EnsureCapacity(results.Count + page.Values.Count);
                    foreach (var value in page.Values)
                    {
                        results.Add((value, value.ETag.ToString()));
                    }
                }

                return (results, pageCount > 1);
            }
            catch (Exception exc) when (exc is not OperationCanceledException)
            {
                if (!AzureTableUtils.TableStorageDataNotFound(exc))
                {
                    LogWarningReadTable(Logger, exc, TableName);
                }

                throw new OrleansException($"Failed to read Azure Storage table {TableName}", exc);
            }
            finally
            {
                CheckAlertSlowAccess(startTime, operation);
            }
        }

        /// <summary>
        /// Inserts a set of new data entries into the table.
        /// Fails if the data does already exists.
        /// </summary>
        /// <param name="collection">Data entries to be inserted into the table.</param>
        /// <returns>Completion promise for this storage operation.</returns>
        public async Task BulkInsertTableEntries(IReadOnlyCollection<T> collection)
        {
            const string operation = "BulkInsertTableEntries";
            if (collection == null) throw new ArgumentNullException(nameof(collection));
            if (collection.Count > this.StoragePolicyOptions.MaxBulkUpdateRows)

View on GitHub (pinned to fca799fa70)

Solutions

  1. Inspect the wrapped InnerException and its Status/ErrorCode (RequestFailedException) to identify the real HTTP cause before changing anything.
  2. Verify the Azure Storage connection string and that the identity used has Table Data Contributor permissions; test with az storage table list or Storage Explorer using the same credentials.
  3. For transient statuses (5xx, 429, timeout), rely on the configured AzureStoragePolicyOptions retry policy / transient error detector; confirm the silo's network route to the account endpoint is open.
  4. If the table genuinely does not exist, allow the membership/storage subsystem to create it (ensure the configured initializer runs) or pre-create the table.
  5. Check Orleans logs for the LogWarningReadTable entry just before this throw to see the exact failure.

Example fix

// before: rely on default policy only, surface the raw OrleansException
try { await tableManager.ReadAll(); }
catch (OrleansException) { /* swallow */ }

// after: unwrap and react to the real storage failure
try { await tableManager.ReadAll(); }
catch (OrleansException ex) when (ex.InnerException is RequestFailedException rfe)
{
    logger.LogError(rfe, "Table read failed status={Status} code={ErrorCode}", rfe.Status, rfe.ErrorCode);
    throw;
}
Defensive patterns

Strategy: retry

Validate before calling

// No caller-side validation prevents transient storage failures;
// configure the retry policy instead.
services.AddAzureStoragePolicyOptions(o =>
{
    o.MaxBulkUpdateRows = 100;
    // ensure a transient-fault retry/detector is configured
});

Try / catch

try { await tableManager.ReadAll(); }
catch (OrleansException ex) when (ex.InnerException is RequestFailedException rfe && (rfe.Status >= 500 || rfe.Status == 429))
{
    // transient: log + let the configured retry policy, or rethrow for higher-level retry
    throw;
}
catch (OrleansException ex)
{
    // non-transient (auth, not found, schema): surface to ops
    throw;
}

Prevention

When it happens

Trigger: Any exception other than OperationCanceledException occurs inside the table-read try block of AzureTableDataManager, and AzureTableUtils.TableStorageDataNotFound(exc) returns false. This covers HTTP 5xx from the storage account, authentication/authorization failures, throttling (429), DNS/network errors, or SDK-level RequestFailedException instances whose status is not in the 'not found' set.

Common situations: Expired or rotated storage account keys, wrong connection string, firewall/service-endpoint blocking the silo, hitting Azure Table request-rate throttling under load, transient regional outage, or using an emulator that returned an unexpected status. Also seen after renaming the deployment with a mismatched ClusterId/ServiceId so the table does not exist under the expected name.

Related errors


AI-assisted analysis of dotnet/orleans@fca799fa70 (2026-08-13). Data as JSON: /api/errors/73566b13136f1bfd. Report an issue: GitHub.