gbbirkisson / spis

Simple private image server 🖼️
GNU General Public License v3.0
128 stars 8 forks source link

OS file watch limit reached #169

Closed jotka closed 7 months ago

jotka commented 8 months ago

When starting in Docker on Synology:

2024-01-12 08:21:31,014 INFO spawned: 'spis' with pid 979 2024-01-12T08:21:31.028597Z INFO spis_server: Starting spis version 0.5.7 2024-01-12T08:21:31.028909Z INFO spis_server: Media dir: "/var/lib/spis/media" 2024-01-12T08:21:31.028922Z INFO spis_server: Thumb dir: "/var/lib/spis/data/thumbnails" 2024-01-12T08:21:31.028931Z INFO spis_server: Data file: "/var/lib/spis/data/spis.db" 2024-01-12T08:21:31.028953Z INFO spis_server: Setting up DB 2024-01-12T08:21:31.031012Z INFO spis_server: Setting up media processing 2024-01-12T08:21:31.031498Z INFO spis_server: Setting up file watcher 2024-01-12T08:21:31.883209Z WARN spis_server::pipeline: file_channel was closed Error: 0: Failed to start file watcher 1: OS file watch limit reached. about ["/var/lib/spis/media/2022/@eaDir/IMG_0168.HEIC"]

Location: spis-server/src/main.rs:89

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it. Run with RUST_BACKTRACE=full to include source snippets. 2024-01-12 08:21:32,010 WARN exited: spis (exit status 1; not expected) 2024-01-12 08:21:33,011 INFO gave up: spis entered FATAL state, too many start retries too quickly

gbbirkisson commented 8 months ago

Hmm, have you tried taking some steps to mitigate the issue like described here? https://stackoverflow.com/a/61462257

Out of curiosity, how many files are you managing with spis?

jotka commented 8 months ago

a couple of thousand with subfolders.

it's really hard to set the sysctl -w fs.inotify.max_user_watches=524288 in the restarting container :)

gbbirkisson commented 8 months ago

Have you tried with docker run --sysctl .........?

github-actions[bot] commented 7 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.