From 411e2a91268031ddb18cb93a5ebd14353b17823d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Fri, 5 Jun 2026 10:54:07 +0200 Subject: [PATCH] Raise open-file limit at startup Listing a repo's refs for the peer selector resolves every remote's signed refs through libgit2, opening a file descriptor per packfile it reads. Radicle storage is a git monorepo that can hold thousands of packfiles, so under the low default limit a Finder-launched bundle exhausts descriptors and objects in the unopened packs spuriously fail with "missing commit", leaving the peer selector stuck loading. Raise the limit to 4096 at startup, matching heartwood's binaries. --- crates/radicle-tauri/src/lib.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/crates/radicle-tauri/src/lib.rs b/crates/radicle-tauri/src/lib.rs index abb6ceb38..1faad32a9 100644 --- a/crates/radicle-tauri/src/lib.rs +++ b/crates/radicle-tauri/src/lib.rs @@ -6,6 +6,16 @@ use commands::{auth, cob, diff, inbox, profile, repo, startup, thread}; #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { + // Raise the open-file limit, matching heartwood's binaries (which all + // default to 4096). Listing a repo's refs for the peer selector resolves + // every remote's signed refs through libgit2, opening a descriptor per + // packfile it reads. Radicle storage can hold thousands of packfiles, so + // under the low default limit (e.g. a Finder-launched bundle) these reads + // exhaust descriptors and objects in the unopened packs spuriously fail. + if let Err(e) = radicle::io::set_file_limit(4096) { + log::warn!("Unable to set open file limit: {e}"); + } + #[cfg(debug_assertions)] let builder = tauri::Builder::default().plugin( tauri_plugin_log::Builder::new()