request_conn_timeout affects key fetching #906

Closed
opened 2025-07-19 13:16:28 +00:00 by rooot · 2 comments
Contributor

the request_conn_timeout setting, which according to config docs, "is used only by URL previews and update/news endpoint checks", affects fetching keys for users, so the number of seconds there is essentially the time that /keys/query will take to complete if any server in the list of keys the client wants to fetch happens to be dead

this means that if that value is set too high, most sane clients will time out the /keys/query request, causing device verification to fail completely

im unsure if this affects anything else apart from key fetching (federation maybe?)

the `request_conn_timeout` setting, which according to config docs, "is used only by URL previews and update/news endpoint checks", affects fetching keys for users, so the number of seconds there is essentially the time that /keys/query will take to complete if any server in the list of keys the client wants to fetch happens to be dead this means that if that value is set too high, most sane clients will time out the `/keys/query` request, causing device verification to fail completely im unsure if this affects anything else apart from key fetching (federation maybe?)
nex added the
Bug
Documentation
Matrix/Client
Status
Confirmed
labels 2025-07-19 13:20:15 +00:00
Author
Contributor

affected services (apart from those mentioned in the config)

  • federation
  • synapse
  • sender
  • pusher
affected services (apart from those mentioned in the config) - federation - synapse - sender - pusher
Author
Contributor

(as per

Preview has been truncated
Ok(Arc::new(Self {
default: base(config)?
.dns_resolver(resolver.resolver.clone())
.build()?,
url_preview: base(config)
.and_then(|builder| {
builder_interface(builder, url_preview_bind_iface.as_deref())
})?
.local_address(url_preview_bind_addr)
.dns_resolver(resolver.resolver.clone())
.redirect(redirect::Policy::limited(3))
.build()?,
extern_media: base(config)?
.dns_resolver(resolver.resolver.clone())
.redirect(redirect::Policy::limited(3))
.build()?,
well_known: base(config)?
.dns_resolver(resolver.resolver.clone())
.connect_timeout(Duration::from_secs(config.well_known_conn_timeout))
.read_timeout(Duration::from_secs(config.well_known_timeout))
.timeout(Duration::from_secs(config.well_known_timeout))
.pool_max_idle_per_host(0)
.redirect(redirect::Policy::limited(4))
.build()?,
federation: base(config)?
.dns_resolver(resolver.resolver.hooked.clone())
.read_timeout(Duration::from_secs(config.federation_timeout))
.pool_max_idle_per_host(config.federation_idle_per_host.into())
.pool_idle_timeout(Duration::from_secs(config.federation_idle_timeout))
.redirect(redirect::Policy::limited(3))
.build()?,
synapse: base(config)?
.dns_resolver(resolver.resolver.hooked.clone())
.read_timeout(Duration::from_secs(305))
.pool_max_idle_per_host(0)
.redirect(redirect::Policy::limited(3))
.build()?,
sender: base(config)?
.dns_resolver(resolver.resolver.hooked.clone())
.read_timeout(Duration::from_secs(config.sender_timeout))
.timeout(Duration::from_secs(config.sender_timeout))
.pool_max_idle_per_host(1)
.pool_idle_timeout(Duration::from_secs(config.sender_idle_timeout))
.redirect(redirect::Policy::limited(2))

)

(as per https://forgejo.ellis.link/continuwuation/continuwuity/src/commit/f513cb75989bf48610784f26a2b73781e306dfbe/src/service/client/mod.rs#L39-L115)
Jade closed this issue 2025-07-20 14:57:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: continuwuation/continuwuity#906
No description provided.