diff --git a/mongo/include/userver/storages/mongo/component.hpp b/mongo/include/userver/storages/mongo/component.hpp index ea72d3500e1e..cb46d42230ee 100644 --- a/mongo/include/userver/storages/mongo/component.hpp +++ b/mongo/include/userver/storages/mongo/component.hpp @@ -34,7 +34,7 @@ namespace components { /// mongo-taxi: /// dbalias: taxi /// appname: userver-sample -/// conn_timeout: 2s +/// conn_timeout: 100ms /// so_timeout: 10s /// queue_timeout: 1s /// initial_size: 16 @@ -53,7 +53,7 @@ namespace components { /// dbalias | name of the database in secdist config (if available) | -- /// dbconnection | connection string (used if no dbalias specified) | -- /// appname | application name for the DB server | userver -/// conn_timeout | connection timeout | 2s +/// conn_timeout | connection timeout | 100ms /// so_timeout | socket timeout | 10s /// queue_timeout | max connection queue wait time | 1s /// initial_size | number of connections created initially | 16 @@ -139,7 +139,7 @@ inline constexpr bool kHasValidate = true; /// ``` /// multi-mongo: /// appname: userver-sample -/// conn_timeout: 2s +/// conn_timeout: 100ms /// so_timeout: 10s /// queue_timeout: 1s /// initial_size: 16 @@ -154,7 +154,7 @@ inline constexpr bool kHasValidate = true; /// Name | Description | Default value /// ---- | ----------- | ------------- /// appname | application name for the DB server | userver -/// conn_timeout | connection timeout | 2s +/// conn_timeout | connection timeout | 100ms /// so_timeout | socket timeout | 10s /// queue_timeout | max connection queue wait time | 1s /// initial_size | number of connections created initially (per database) | 16 diff --git a/mongo/include/userver/storages/mongo/pool_config.hpp b/mongo/include/userver/storages/mongo/pool_config.hpp index dc61a07b7bd5..466b3b7f2593 100644 --- a/mongo/include/userver/storages/mongo/pool_config.hpp +++ b/mongo/include/userver/storages/mongo/pool_config.hpp @@ -58,7 +58,7 @@ struct PoolConfig final { }; /// Default connection timeout - static constexpr auto kDefaultConnTimeout = std::chrono::seconds{2}; + static constexpr auto kDefaultConnTimeout = std::chrono::milliseconds{100}; /// Default socket timeout static constexpr auto kDefaultSoTimeout = std::chrono::seconds{10}; /// Default connection queue timeout diff --git a/mongo/src/storages/mongo/component.cpp b/mongo/src/storages/mongo/component.cpp index 664848c79d41..ed6485563aa3 100644 --- a/mongo/src/storages/mongo/component.cpp +++ b/mongo/src/storages/mongo/component.cpp @@ -133,7 +133,7 @@ additionalProperties: false conn_timeout: type: string description: connection timeout - defaultDescription: 2s + defaultDescription: 100ms so_timeout: type: string description: socket timeout