-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Raspberry Pi 4 crashes while indexing #1172
Comments
Just FYI, setting swap would not help you anyway, as docker does not take swap memory into account, at least not per default. What you can try and do is to exclude larger files from being reindexed using |
Thanks for the tip about the swap, I will look into using the w.r.t. the limit value, it does not seem to change anything, as most of my images are low-medium quality (<10mb) and videos <50mb. I think this is more related to the amount of images being thumbnailed at the same time, although I have no real way to confirm this. |
When there is only one worker, then only one file should be processed at a time. You may run |
Note that the |
I decided to dig into the log files of the server and found that there was a recurring error related to cgroups, which was thrown by the docker service. After googling, I found a solution enable cgroups for memory in my I did the usual To test I have added a large (900 images) library to photoprism with no negative observed effects. In the end I can't comment on what solved the issue, but in my opinion we can close this. |
@graciousgrey should add this to our docs |
Would be good to have at least one instance of another user facing the same issue and resolving with the same solution. I would reverse the cgroup trick to verify if this was actually the solution, but currently have too many live services to test. Perhaps it was a simple docker update that did it? Unsure. |
I just had to implement the settings you gave here to get my indexing working again on a RPI4, that said I have no idea why indexing stopped working to begin with as it was working back in october during my last photo dump |
From what I understood reading related blog posts and documentation,
This isn't part of our default configuration. Did you change the configuration to limit memory usage? Do you use Kubernetes or any other container management system that might do this implicitly? |
If you set a hard memory limit for PhotoPrism (or all Docker containers in general) and it then comes across a large file that temporarily needs more memory while indexing, this would also explain why the container is killed and it looks like PhotoPrism has "crashed". |
Updated our config examples to include the note: |
Getting Started docs have been updated as well: |
at the moment I have no restrictions on my prism container, although my RPI4 is the 4GB ram model not 8 the only difference between these photos and my oct dumb that I have found so far is that the latest photos were vertical frame (an older relative took them) and were from a different camera model although I don't think they were particularly large resolution |
But now it's working flawlessly? |
Yesterday it crashed with the same error:
I've also noticed it seems to be doing that ^ every few seconds 24/7 is that normal if no one is viewing the webfront? |
Is this our latest release? Log level should be debug for this now. Depends on the wakeup interval which is configurable. |
photoprism/photoprism:latest? See https://docs.photoprism.org/getting-started/raspberry-pi/ |
yes latest, thanks I've added "arm_64bit=1" to my firmware config and redeployed with debug turned on, will follow up if I get useful results/ crash logging |
Installation details
I followed the official installation guide here.
Hardware: RPi 4 4gb @ 2100 MHz with active cooling
OS: Ubuntu Server 20.10 arm64
The server has all images stored on an ssd on which the OS runs.
Running everything as services in compose.
Compose file
The Problem
The server crashes when importing larger (e.g. > 3) amounts of files. Have tried reducing the amount but manually uploading 3 files every time is tedious. Have to physically reset the server after such a crash.
I suspect this is related to the thumbnail creation module, but is there a way to stage the thumbnail creation so that it takes longer, but doesn't crash?
Steps I've taken to solve this
Everything on the documentation page, including:
PHOTOPRISM_WORKERS=1
PHOTOPRISM_FFMPEG_ENCODER
Extra info
Below image shows an ssh connection on the moment the server crashes.
docker logs -f photoprism
.swapon -s
to see swap usage. It can be observed that swap is not entirely used.vcgencmd measure_temp
- a module to measure temperatures on a raspberrypi CPU.The text was updated successfully, but these errors were encountered: