M!RFAN
Publish Profile Error
First of all thanks and sorry for crossposting
I want to check which environment it loads and it doesn't log in IIS so manually checking on local.
Console.WriteLine($"{builder.Environment.EnvironmentName} - {Environment.GetEnvironmentVariable("ASPNETCORE_ENVIRONMENT")} - {JsonSerializer.Serialize(redisOptions)}");
for builder.Environment.EnvironmentName it returns Production and for ASPNETCORE_ENVIRONMENT its empty and I set the env value in iis configuration editor for application pool and the for system.webserver for aspnet its already set to Development but not working
7 replies
Redis Timeout
sure
Replica access failed, trying primary node: Timeout performing GET (5000ms), next: GET MNDAPIRECORDSAffliate, inst: 0, qu: 0, qs: 0, aw: False, bw: Inactive, rs: ReadAsync, ws: Idle, in: 0, last-in: 50441, cur-in: 647420, sync-ops: 4, async-ops: 1, serverEndpoint: dev-demo-0001-002.dev-demo.lketx2.euw2.cache.amazonaws.com:6379, conn-sec: 17.42, aoc: 1, mc: 1/1/0, mgr: 10 of 10 available, clientName: 169(SE.Redis-v2.6.111.64013), PerfCounterHelperkeyHashSlot: 1992, IOCP: (Busy=0,Free=1000,Min=2,Max=1000), WORKER: (Busy=1,Free=32766,Min=2,Max=32767), POOL: (Threads=6,QueuedItems=0,CompletedItems=3022), v: 2.6.111.64013 (Please take a look at this article for some common client-side issues that can cause timeouts: https://stackexchange.github.io/StackExchange.Redis/Timeouts)
This is our error
55 replies
Redis Timeout
var options = new ConfigurationOptions
{
EndPoints = { endpoint },
ConnectRetry = 1, // Retry connection only once in case of failure
ConnectTimeout = 3000, // Set connection timeout to 3000ms
Ssl = true, // Enable SSL if required
IncludeDetailInExceptions = true,
};
// Establish the connection using the configured options
ConnectionMultiplexer connection = ConnectionMultiplexer.Connect(options);
var cache = ReadRedisConnectorHelper.Connection.GetDatabase();
try
{
// Try to read from the replica
data = cache.StringGet(ParamName, CommandFlags.PreferReplica);
}
catch (Exception ex)
{
Console.WriteLine("Replica access failed, trying primary node: " + ex.Message);
// Fallback to primary node if the replica fails
data = cache.StringGet(ParamName, CommandFlags.DemandMaster);
}
55 replies