mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-08-26 05:14:11 +02:00
Fix startup failure from fd exhaustion when launched via Finder (#500)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
f2972ee534
commit
b332a0eba9
@@ -1676,6 +1676,14 @@ async fn cmd_check_for_updates<R: Runtime>(
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
#[cfg_attr(feature = "cef", tauri::cef_entry_point)]
|
||||
pub fn run() {
|
||||
// GUI apps launched via Finder/launchd inherit a 256 open-file soft limit on macOS
|
||||
// (1024 on most Linux desktops). SQLite WAL connections hold ~3 fds each, so raise
|
||||
// the limit toward the hard cap before opening any DB pools.
|
||||
#[cfg(any(target_os = "macos", target_os = "linux"))]
|
||||
if let Err(e) = rlimit::increase_nofile_limit(10240) {
|
||||
eprintln!("Failed to raise open-file limit: {e}");
|
||||
}
|
||||
|
||||
let mut builder = tauri::Builder::<TauriRuntime>::default().plugin(
|
||||
Builder::default()
|
||||
.targets([
|
||||
|
||||
Reference in New Issue
Block a user