From 57ecd81534aed4cd26d94bcb4c176c8d0fc7e295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20K=C3=B6sters?= Date: Mon, 24 May 2021 13:21:15 +0200 Subject: [PATCH 1/2] fix: logs for ruma crate --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 7257d698..fc61a0b0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -212,8 +212,8 @@ async fn main() { let rocket = setup_rocket(raw_config, db); rocket.launch().await.unwrap(); } else { - std::env::set_var("CONDUIT_LOG", config.log); - pretty_env_logger::init_custom_env("CONDUIT_LOG"); + std::env::set_var("RUST_LOG", config.log); + tracing_subscriber::fmt::init(); let rocket = setup_rocket(raw_config, db); rocket.launch().await.unwrap(); From aacf6289db3cc97869493943189a5d1afa861f3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20K=C3=B6sters?= Date: Mon, 24 May 2021 17:59:06 +0200 Subject: [PATCH 2/2] improvement: increase default max concurrent requests --- DEPLOY.md | 2 +- conduit-example.toml | 2 +- debian/postinst | 2 +- src/database.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DEPLOY.md b/DEPLOY.md index 02073ff6..c48b7780 100644 --- a/DEPLOY.md +++ b/DEPLOY.md @@ -99,7 +99,7 @@ allow_federation = true trusted_servers = ["matrix.org"] #cache_capacity = 1073741824 # in bytes, 1024 * 1024 * 1024 -#max_concurrent_requests = 4 # How many requests Conduit sends to other servers at the same time +#max_concurrent_requests = 100 # How many requests Conduit sends to other servers at the same time #workers = 4 # default: cpu core count * 2 address = "127.0.0.1" # This makes sure Conduit can only be reached using the reverse proxy diff --git a/conduit-example.toml b/conduit-example.toml index 3ac3a485..66c105be 100644 --- a/conduit-example.toml +++ b/conduit-example.toml @@ -36,7 +36,7 @@ max_request_size = 20_000_000 # in bytes trusted_servers = ["matrix.org"] #cache_capacity = 1073741824 # in bytes, 1024 * 1024 * 1024 -#max_concurrent_requests = 4 # How many requests Conduit sends to other servers at the same time +#max_concurrent_requests = 100 # How many requests Conduit sends to other servers at the same time #log = "info,state_res=warn,rocket=off,_=off,sled=off" #workers = 4 # default: cpu core count * 2 diff --git a/debian/postinst b/debian/postinst index c3d727c1..6a4cdb8a 100644 --- a/debian/postinst +++ b/debian/postinst @@ -74,7 +74,7 @@ max_request_size = 20_000_000 # in bytes #allow_jaeger = false #cache_capacity = 1073741824 # in bytes, 1024 * 1024 * 1024 -#max_concurrent_requests = 4 # How many requests Conduit sends to other servers at the same time +#max_concurrent_requests = 100 # How many requests Conduit sends to other servers at the same time #log = "info,state_res=warn,rocket=off,_=off,sled=off" #workers = 4 # default: cpu core count * 2 EOF diff --git a/src/database.rs b/src/database.rs index 76eae244..561b5612 100644 --- a/src/database.rs +++ b/src/database.rs @@ -67,7 +67,7 @@ fn default_max_request_size() -> u32 { } fn default_max_concurrent_requests() -> u16 { - 4 + 100 } fn default_log() -> String {