StackExchange / StackExchange/StackExchange.Redis

Error Connecting to Elasticache Redis Serverless - How to use TextWriter for Details

Open
#2,710 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
6.2k
Forks
1.6k
Avg merge
1d 15h
Merged PRs (30d)
43

Description

Id like to use an Elasticache Redis Serverless instance from a Lambda for "aggregating" data as it is ingested (write-thru cache).

StringWriter sw = new StringWriter();
ConfigurationOptions redCfgOptions = new ConfigurationOptions
{
EndPoints =
{
{ envRedisEndPoint, envRedisPort }
},
Ssl = true,
ConnectRetry = 3
}

ConnectionMutliplexer redis = ConnectionMultiplexer.Connect(redCfgOption, sw);
context.Logger.LogInformation("Connected !")

Elasticache Redis is configured and a .Net Lambda is deployed with a StringWriter when trying to connect.
I never get i get the following when it tries

2024-05-03T16:36:45.046Z 9349f934-4fe6-5d45-90dd-a79b5b290b8e fail It was not possible to connect to the redis server(s). Error connecting right now. To allow this multiplexer to continue retrying until it's able to connect, use abortConnect=false in your connection string or AbortOnConnectFail=false; in your code.

So I will try AbortOnConnectFail=false but what I really want first is what am I doing wrong with StringWriter (impl of TextWriter abstract)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report names StringWriter, ConfigurationOptions, and ConnectionMultiplexer.Connect but no repository files, tests, or implementation entry points. Start by locating the connection diagnostics API and reproducing the Elasticache connection attempt; done means establishing whether the TextWriter usage is incorrect and documenting a confirmed, actionable resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, csharp, redis
Domain
backend, cloud, databases
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.