-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
For a demo I'm building I'd like to show the effect of a bad Valkey connection configuration to a server's request handling. Currently, the effect is that the requests are blocked indefinitely as it seems the connection attempt never times out.
let client = ValkeyClient(.hostname("badhost", port: 1234), logger: logger)
// blocked indefinitely
try await client.hget(ValkeyKey(userID), field: "cart")
2025-09-07T08:55:21Z [debug] cart [unknown] Creating new connection code.filepath=Valkey/ValkeyConnection+ConnectionPool.swift valkey_connection_id=0 code.lineno=76
2025-09-07T08:55:26Z [debug] cart [unknown] Connection creation failed valkey_connection_id=0 code.filepath=Valkey/ValkeyConnection+ConnectionPool.swift error=DNS error: unknown(host: "badhost", port: 1234) code.lineno=87
2025-09-07T08:55:26Z [debug] cart [unknown] Creating new connection code.filepath=Valkey/ValkeyConnection+ConnectionPool.swift valkey_connection_id=0 code.lineno=76
2025-09-07T08:55:26Z [debug] cart [unknown] Connection creation failed valkey_connection_id=0 code.filepath=Valkey/ValkeyConnection+ConnectionPool.swift error=DNS error: unknown(host: "badhost", port: 1234) code.lineno=87
# ...
Is this the desired behavior or should Valkey time out when establishing connections?
Metadata
Metadata
Assignees
Labels
No labels