Skip to content

Redis errors with ReplyError: ERR UNKOWN_CLIENT #212

@wmr-trevor

Description

@wmr-trevor

There appears to be an issue with redis connections. They work fine for a time and then they seem to break.

It appears to me as if the error message that was used to determine if the client should be re-registered has changed. Instead of it only being UNKNOWN_CLIENT it is now ERR UNKOWN_CLIENT

else if e.message == "UNKNOWN_CLIENT"

The error received. This error happens exactly every 5 seconds.

ReplyError: ERR UNKNOWN_CLIENT
    at parseError (/app/node_modules/redis-parser/lib/parser.js:179:12)
    at parseType (/app/node_modules/redis-parser/lib/parser.js:302:14) {
  command: 'EVALSHA',
  args: [
    '8bd3e064b718321194a8df49c69e48fd0ffb4dcd',
    8,
    'b_node-print-rate-limit_settings',
    'b_node-print-rate-limit_job_weights',
    'b_node-print-rate-limit_job_expirations',
    'b_node-print-rate-limit_job_clients',
    'b_node-print-rate-limit_client_running',
    'b_node-print-rate-limit_client_num_queued',
    'b_node-print-rate-limit_client_last_registered',
    'b_node-print-rate-limit_client_last_seen',
    1677246715764,
    'fbe2isbe9mc'
  ],
  code: 'ERR'
}

In my setup I am passing in the redis connection details directly and using the redis datastore option.

const rateLimiter = new Bottleneck({
    maxConcurrent: 2,
    minTime: 100,

    // set the limiter id
    id: "node-print-rate-limit",

    // setup the redis store
    datastore: "redis",
    clientOptions: getDetails(),
    timeout: 30 * 1000,
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions