From: Mike Perry Date: Thu, 5 Jun 2025 15:12:32 +0000 (+0000) Subject: Add ratelimit log for hsdesc pruning during oomkiller X-Git-Tag: tor-0.4.8.18~6^2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f3cd1035288b26777583ab044348625c94e3922a;p=thirdparty%2Ftor.git Add ratelimit log for hsdesc pruning during oomkiller --- diff --git a/src/core/or/relay.c b/src/core/or/relay.c index a6c04f6be2..f680aed9c1 100644 --- a/src/core/or/relay.c +++ b/src/core/or/relay.c @@ -2943,6 +2943,11 @@ cell_queues_check_size(void) removed = hs_cache_handle_oom(bytes_to_remove); oom_stats_n_bytes_removed_hsdir += removed; alloc -= removed; + static ratelim_t hs_cache_oom_ratelim = RATELIM_INIT(600); + log_fn_ratelim(&hs_cache_oom_ratelim, LOG_NOTICE, LD_REND, + "HSDir cache exceeded limit (%zu > %"PRIu64" bytes). " + "Pruned %zu bytes during cell_queues_check_size.", + hs_cache_total, get_options()->MaxHSDirCacheBytes, removed); } if (geoip_client_cache_total > get_options()->MaxMemInQueues / 5) { const size_t bytes_to_remove =