valkey-py icon indicating copy to clipboard operation
valkey-py copied to clipboard

AUTH errors on RESP 3 with health check interval > 0

Open robert-schmidtke opened this issue 8 months ago • 0 comments

Hi,

when using protocol=3 and a health_check_interval that is positive against a Valkey instance that has AUTH configured, any command raises an authentication error.

This is because the health check (PING and PONG) are sent before the actual command, even if it's the HELLO AUTH command: https://github.com/valkey-io/valkey-py/blob/main/valkey/connection.py#L381

Disabling the health checks or using protocol version 2 works as expected.

robert-schmidtke avatar Apr 07 '25 13:04 robert-schmidtke