Increase DCP connection handshake timeout

Description

The DCP connection handshake timeout is the duration allowed for SASL auth, opening the DCP connection, and setting DCP controls. It is derived from the socket connect timeout, and defaults to 3 seconds.

There is currently no way for a connector user to override the default handshake timeout or default socket connect timeout.

The user can override the default handshake timeout by using the "CBES_OPTS" environment variable to set a Java system property before running the connector,like this:

The system property value is in milliseconds. The actual timeout will be slightly higher.


The DCP client has another configurable timeout called the "bootstrap timeout", which limits how long the client will wait to receive the first cluster map config from the server. Default is 10 seconds.
This configuration option is also not currently exposed to a connector user, but it's a more reasonable timeout value.

Proposed fix: Use the same timeout value for the socket timeout, bootstrap timeout, and handshake timeout, since they're all essentially "how long we're willing to wait for a new DCP connection." Default to 10 seconds (the current default bootstrap timeout).

Add an undocumented "connectTimeout" config option to the "couchbase.dcp" section. This will set all the timeouts mentioned above. Leave it undocumented because for now it's for helping a single user... and we don't expect they'll need to increase it beyond the default of 10 seconds. Looking to the future, we'd like to expose all DCP client settings to power users without requiring changes to the connector's config file parser; the connect timeout setting would fall into that category.

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Sprint

Fix versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created October 3, 2022 at 7:21 PM
Updated October 4, 2022 at 5:11 PM
Resolved October 4, 2022 at 5:11 PM
Instabug