How to avoid that a SNAP application takes down my server?

hi Boris,
as you know, Photoprism is maybe the most demanding app in terms of CPU occupation even if you disable every feature (face recognition, etc.), exactly what I did because I have a very weak ARM CPU (Odroid HC4).
What I want to highlight is another problem, (I don’t want to discuss about Photoprism): this application can take down my server in case the indexing process gets stuck. The machine becomes irresponsive also to SSH. It can only be switched off brutally through power interruption. It means that, potentially, any SNAP application can occupy the entire CPU and make the machine irresponsive. This, to me, sounds as a “Windows-like” attitude that should not occur on a Linux system. Do you agree?
Hints and details:

  1. I can reproduce the error all the times you need but, as you understand, I cannot send the logs immediately due to unresponsiveness. I can send them after having rebooted the machine, would it be useful?
  2. is there any configuration available at system level to avoid this behaviour for every application? I prefer to have a slower application with the certainty that it cannot block my server!! Today is Photoprism, tomorrow it could be Plex, Nextcloud or whatever. Thanks.
  3. Don’t you see it as a general problem?

Thanks a lot. Let me know how I can help you in testing or whatever.

Simone

I agree it is a problem, while I use a bit more powerful nuc with intel CPU and seems to be ok. We definitely can improve things, let’s just see your debug email first to be sure it is not some kind of hardware failure.

Pushed some improvements to platform swap management and out of memory protection to core services.
Also there is a new settings screen called Health which shows these protection events when they happen.
Let me know if it is better after that upgrade or not.

1 Like

hi Boris,
I have noticed the new “health” function. Looks great. I’m reinstalling photoprism, then I’ll do a scan of a particular folder that usually makes it crash and see what happens in the “health” panel.

I was able to index that folder. So, in my opinion, something has been improved. Thanks! Now I’ll try the “forbidden task” that always made my machine to crash: indexing the entire library in a single run.
I’ll keep you up to date. Thanks

Hi,
the out of memory protection works great or, whatever it is, the situation is definitely better than before. Now the indexing process cannot take down the entire machine anymore. I think it is terminated according to what I see in the “health panel” (see blow) and this prevents a single process to crash the machine. Very good job!

1 Like