Skip to content

READONLY You can't write against a read only replica. #1643

@thaitanloi365

Description

@thaitanloi365

Hi,
I'm using this library in many projects. Sometimes I was getting this error. I only used this library for caching purposes with basic Get,Set function.
Here is my redis configuration:

	var cache = redis.New(&redis.Config{
			Namespace:         config.RedisNamespace,
			DefaultExpiration: time.Hour * 2,
			Options: &goredis.Options{
				Addr:         config.RedisAddress,
				DB:           config.RedisDBMode,
				Password:     config.RedisPassword,
				PoolSize:     1000,
				PoolTimeout:  2 * time.Minute,
				IdleTimeout:  10 * time.Minute,
				ReadTimeout:  2 * time.Minute,
				WriteTimeout: 1 * time.Minute,
			},
		})

Please help me to troubleshoot this issue. Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions