diff --git a/atlasdb-cassandra/src/main/java/com/palantir/atlasdb/cassandra/CassandraKeyValueServiceConfig.java b/atlasdb-cassandra/src/main/java/com/palantir/atlasdb/cassandra/CassandraKeyValueServiceConfig.java index e9aad7eeee1..f29e11ef4dc 100644 --- a/atlasdb-cassandra/src/main/java/com/palantir/atlasdb/cassandra/CassandraKeyValueServiceConfig.java +++ b/atlasdb-cassandra/src/main/java/com/palantir/atlasdb/cassandra/CassandraKeyValueServiceConfig.java @@ -329,11 +329,15 @@ default int socketQueryTimeoutMillis() { * When a Cassandra node is down or acting malignantly, it is plausible that we succeed in creating a socket but * subsequently do not read anything, and thus are at the mercy of the {@link #socketQueryTimeoutMillis()}. This is * particularly problematic on the creation of transaction managers and client pools in general: we can end up in - * a state where a query to a bad host blocks us for _at least_ + * a state where a query to a bad host blocks us for up to 126 seconds with default settings (due to retrying three + * times on the first node). + * + * This initial timeout actually affects the creation of the clients themselves, and is only set for the call to + * login on Cassandra. When that is successful, the query timeout is set to the regular setting above. */ @Value.Default default int initialSocketQueryTimeoutMillis() { - return 2 * 1000; + return 5 * 1000; } @Value.Default