Raise timeouts during connection initialization

Description

We currently have:

While connect-timeout seems fine, init-query-timeout is a bit aggressive and doesn't allow clients to connect when connecting over long distances, e.g. remote clients connecting to an Astra cluster. Since this timeout is only applicable when opening new connections, I'm not sure that being so aggressive is necessary. I suggest raising init-query-timeout to a few seconds. But as a consequence, it might be a good thing too to raise connect-timeout.

Environment

None

Pull Requests

None

Activity

Show:
Erik Merkle
July 8, 2020, 6:01 PM

Just a small note that for testing purposes, we can always override the defaults with lower values to avoid lengthening the time the tests take to run, at least for integration tests that are designed to verify timeouts.

Tomasz Lelek
July 20, 2020, 9:48 AM

Maybe we could detect when the connection is made to the Astra cluster and increase defaults in that case? wdyt?

Alexandre Dutra
July 21, 2020, 9:58 AM

Maybe we could detect when the connection is made to the Astra cluster and increase defaults in that case? wdyt?

But what if a user changes the timeouts in their application.conf file or programmatically? I think it is easier to have a common timeout declared in reference.conf.

Tomasz Lelek
July 22, 2020, 10:03 AM

regarding IT tests, we are already overriding the init-query-timeout with higher value, see /integration-tests/resources/application.conf:

Alexandre Dutra
August 20, 2020, 11:13 AM
Edited

Note: this unfortunately does not solve people’s problems when connecting to Astra using Spring Boot, since Spring Boot forcibly overrides a few timeouts. So Spring Boot users still need to raise the timeouts manually:

Fixed

Assignee

Tomasz Lelek

Reporter

Alexandre Dutra

Labels

None

PM Priority

None

Affects versions

None

Fix versions

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Reviewer

Alexandre Dutra

Priority

Major
Configure