redis / go-redis

Redis Go client
https://redis.uptrace.dev
BSD 2-Clause "Simplified" License
19.96k stars 2.36k forks source link

redis eval error: ERR unknown subcommand 'setinfo'. Try CLIENT HELP. #2910

Closed gwkline closed 7 months ago

gwkline commented 7 months ago

Running into this error since updating from 9.4.0 to 9.5.0:

redis eval error: ERR unknown subcommand 'setinfo'. Try CLIENT HELP.

Not sure if this is an issue with how our worker queue package is interfacing with redis, but since the recent release made changes to setinfo I figured I would raise the issue just in case. I will try and update this issue with pertinent info as I investigate further

Running on go 1.22.0, the worker queue package is called asynq. Thanks!

ofekshenawa commented 7 months ago

Hey @gwkline ,

The client setinfo command has been available since Redis version 7.2.0. This command is automatically run at the start of each connection. If you wish to prevent this from happening, you can modify your connection options to include DisableIdentity: true. This will stop the command from executing at the beginning of each connection.

Please let us know if this solution addresses your issue or if you need any further assistance:)

mayah commented 7 months ago

Hi, I encountered the same problem. DisableIndentity: true solved the issue.

By the way, isn't this option a typo? DisableIdentity (not I*n*dentity) seems correct to me. (It's already pointed out in https://github.com/redis/go-redis/pull/2708#discussion_r1334887212, though)

gwkline commented 7 months ago

Hey @gwkline ,

The client setinfo command has been available since Redis version 7.2.0. This command is automatically run at the start of each connection. If you wish to prevent this from happening, you can modify your connection options to include DisableIdentity: true. This will stop the command from executing at the beginning of each connection.

Please let us know if this solution addresses your issue or if you need any further assistance:)

This was the issue, Heroku defaults to using Redis 7.0 currently, upgrading to 7.2 fixed! Thanks for the help.