Why am I seeing `SYSCALL returned=5 errno=0 state=SSLv3/TLS write client hello` when trying to connect to Heroku Redis?

Issue

I'm getting temporary or permanent SSL_connect SYSCALL returned=5 errno=0 state=SSLv3/TLS write client hello errors when trying to connect to Heroku Redis.

Resolution

OpenSSL::SSL::SSLError (_SSL_connect SYSCALL returned=5 errno=0 state=SSLv3/TLS write client hello_) is the error that some Redis Ruby clients raise when Redis 6 rejects a connection because the maximum number of clients to Redis has been reached.

In previous Redis versions without native TLS support, Redis would return a ERR max number of clients reached error instead. Starting with Redis 6, which provides native TLS support, Redis will directly drop the connection if the number of maxclients is reached. At this point of the connection, the TLS handshake of the connection hasn't happened yet, which results in seeing a SSL connection error instead of a more descriptive error message.

In other cases like the case for the redis-py Python client, this behavior results in errors similar to ConnectionError: Error 8 connecting to xxx. EOF occurred in violation of protocol (_ssl.c:1123).

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support