Update logs
This commit is contained in:
@@ -97,10 +97,9 @@ public static class ApiBootstrap
|
||||
|
||||
return hostBuilder.UseOrleans(siloBuilder =>
|
||||
{
|
||||
// Configure clustering - force localhost clustering in development mode
|
||||
if (!disableOrleansClustering && !string.IsNullOrEmpty(postgreSqlConnectionString) && isProduction)
|
||||
// Configure clustering with improved networking or use localhost clustering if disabled
|
||||
if (!disableOrleansClustering && !string.IsNullOrEmpty(postgreSqlConnectionString))
|
||||
{
|
||||
// Only use ADO.NET clustering in production
|
||||
siloBuilder
|
||||
.UseAdoNetClustering(options =>
|
||||
{
|
||||
@@ -110,12 +109,12 @@ public static class ApiBootstrap
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use localhost clustering for development or when database is unavailable
|
||||
// Fallback to localhost clustering for testing or when database is unavailable
|
||||
siloBuilder.UseLocalhostClustering();
|
||||
}
|
||||
|
||||
// Conditionally configure reminder service based on flag - only in production with ADO.NET clustering
|
||||
if (runOrleansGrains && !disableOrleansClustering && !string.IsNullOrEmpty(postgreSqlConnectionString) && isProduction)
|
||||
// Conditionally configure reminder service based on flag
|
||||
if (runOrleansGrains && !disableOrleansClustering && !string.IsNullOrEmpty(postgreSqlConnectionString))
|
||||
{
|
||||
siloBuilder.UseAdoNetReminderService(options =>
|
||||
{
|
||||
@@ -165,6 +164,10 @@ public static class ApiBootstrap
|
||||
options.ProbeTimeout = TimeSpan.FromSeconds(10);
|
||||
options.IAmAliveTablePublishTimeout = TimeSpan.FromSeconds(30);
|
||||
options.MaxJoinAttemptTime = TimeSpan.FromSeconds(120);
|
||||
|
||||
// Improved settings for development environments with stale members
|
||||
options.DefunctSiloCleanupPeriod = TimeSpan.FromMinutes(1);
|
||||
options.DefunctSiloExpiration = TimeSpan.FromMinutes(2);
|
||||
})
|
||||
.Configure<GatewayOptions>(options =>
|
||||
{
|
||||
@@ -212,10 +215,9 @@ public static class ApiBootstrap
|
||||
});
|
||||
}
|
||||
|
||||
// Configure grain storage - use ADO.NET for production or memory for development/fallback
|
||||
if (!disableOrleansClustering && !string.IsNullOrEmpty(postgreSqlConnectionString) && isProduction)
|
||||
// Configure grain storage - use ADO.NET for production or memory for fallback
|
||||
if (!disableOrleansClustering && !string.IsNullOrEmpty(postgreSqlConnectionString))
|
||||
{
|
||||
// Use ADO.NET storage in production
|
||||
siloBuilder
|
||||
.AddAdoNetGrainStorage("bot-store", options =>
|
||||
{
|
||||
@@ -240,7 +242,7 @@ public static class ApiBootstrap
|
||||
}
|
||||
else
|
||||
{
|
||||
// Use memory storage for development or when database is unavailable
|
||||
// Fallback to memory storage when database is unavailable
|
||||
siloBuilder
|
||||
.AddMemoryGrainStorage("bot-store")
|
||||
.AddMemoryGrainStorage("registry-store")
|
||||
|
||||
Reference in New Issue
Block a user