Closed inajob closed 1 year ago
Hi @inajob
maybe it is an issue with the your cpu und sharp? See https://github.com/xemle/home-gallery/issues/81#issuecomment-1595175119
I used that option, but below error occurred.
cli.spawn Cli extract --index /data/config/Pictures.idx --storage /data/storage --exclude .mp4 --exclude .MOV --exclude *.mov --use-native vipsthumbnail convert ffprobe ffmpeg exited by signal SIGKILL
Mm. OK. thank you very much for testing.
So you are testing with a Rasperry Pi 3. Unfortunately I do have only a Raspberry Pi 4 running Ubuntu. So I can hardly replay your situation.
The next idea is: Could it be a memory issue? How many RAM/swap do you have?
Have you tried to set the log level to trace and run the cli command manually? Eg.
/app/gallery.js -l trace extract --index /data/config/Pictures.idx --storage /data/storage --exclude .mp4 --exclude .MOV --exclude *.mov --use-native vipsthumbnail convert ffprobe ffmpeg
You can also try to use the generic bundle. See docs for it. At least you can check the extract command here.
@xemle I see. My raspberry pi 3 runs other softwares, so I try to stop these processes, and try extract again.
As I said, this Raspberry Pi runs other softwares, so free memory is few...
$ free -h
total used free shared buff/cache available
Mem: 922Mi 396Mi 185Mi 5.0Mi 340Mi 469Mi
Swap: 99Mi 99Mi 0.0Ki
Result of below command.
/app/gallery.js -l trace extract --index /data/config/Pictures.idx --storage /data/storage --exclude .mp4 --exclude .MOV --exclude *.mov --use-native vipsthumbnail convert ffprobe ffmpeg
<--- Last few GCs --->
[1:0x741f3070] 3462962 ms: Scavenge 193.7 (218.6) -> 193.3 (218.6) MB, 1.2 / 0.0 ms (average mu = 0.986, current mu = 0.988) allocation failure;
[1:0x741f3070] 3463606 ms: Scavenge 193.7 (218.6) -> 193.3 (218.6) MB, 1.3 / 0.0 ms (average mu = 0.986, current mu = 0.988) allocation failure;
[1:0x741f3070] 3471456 ms: Mark-sweep 263.5 (288.4) -> 255.3 (282.4) MB, 3755.7 / 110.4 ms (average mu = 0.968, current mu = 0.950) allocation failure; scavenge might not succeed
<--- JS stacktrace --->
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
I'll stop other software, but I want the way for few memory. In my case some photo extract succeeded. Are some photos too big? or does nodejs process make big for the sake of garbage?
Hi @inajob thank you so much for the investigation. Currently I can not tell what requires such amount of resources. It would need a profiler to catch these hotspots. An I would recommend to do such investigation on a desktop environment.
While in theory it should be possible to run the media conversion on a low powered device such Rasperry Pi 3 it might not be the best solution to do so.
You can also create the gallery on a powerful desktop machine and fetch the final gallery from your Pi. See the fetch command. The server part should require less resources. The gallery can be also served as read only gallery (no tagging) via a static export and requires even less resources. See the export command.
Regarding a remote data repository there is no solution so far. One idea is to use rclone as docker remote storage. Should work but I have not tested it yet.
Hope these ideas are helping.
And thanks again for your time and valuable input.
Closing it due inactivity. Please do not hesitate to reopen it if required.
I use docker image on Raspberry Pi 3. The initial import is failed by SIGKILL.
how to solve this?