Skip to content
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

When the face recognition service dies, only a backend restart brings it back #1124

Open
sefininio opened this issue Jan 15, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@sefininio
Copy link

When the face recognition service dies, the logs are filled with errors like:

INFO:ownphotos:HTTPConnectionPool(host='localhost', port=8005): Max retries exceeded with url: /face-locations (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x1495a6132e50>: Failed to establish a new connection: [Errno 111] Connection refused'))

If this happens during a scan - the result is a lot of these errors and no inferred faces from the scan - so a backend restart and rescan is required.

Suggestion - the code that handles the above error, can :

  • Pause the scan
  • Restart the service
  • Wait for it to be up and available
  • Retry the failed task and continue the scan.
@sefininio sefininio added the enhancement New feature or request label Jan 15, 2024
@BoBBer446
Copy link

BoBBer446 commented Apr 4, 2024

Hello,

I am experiencing a persistent issue with the face scanning process in LibrePhotos. Despite multiple attempts to rectify the situation, the job consistently fails to complete.

Here's a brief overview of my current setup and the problem:

  • Database Size: The database currently spans 3840 days and contains a total of 137,391 photos.
  • Issue: The 'Scan Faces' job begins but does not successfully finish; it keeps stopping prematurely.
  • Logs: Below is an excerpt from the logs indicating the problem:
INFO:ownphotos:HTTPConnectionPool(host='localhost', port=8005): Max retries exceeded with url: /face-locations (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x1495a6132e50>: Failed to establish a new connection: [Errno 111] Connection refused'))
ERROR:image e1b97488677cefc9965465d5b50381eb1 - rene_libre_photos - /data/rene/2021/05/20210528_094129.mp4: scan face failed
ERROR: An error occurred: UnboundLocalError: cannot access local variable 'face_locations' where it is not associated with a value

The issue seems to be related to the face recognition service becoming unresponsive, and only a backend restart temporarily resolves the issue. However, given the large volume of assets, the scan faces job seems to break repeatedly without going through the entire dataset.

This problem has been ongoing, it appears the problem persists, and the system cannot handle larger databases efficiently for face recognition tasks.

Any insights or suggestions on how to resolve this would be greatly appreciated.

If i restart the Backend the Backend and rescan for faces it goes down after few hours

Thank you for your attention to this matter.
Screenshot_20240404_085216_com android chrome

@maciejmatuszak
Copy link

Same here.
Also I am experiencing issue that may be related:
In /settings page change the Face Recognition Model then click on Update in the pop-up dialogue.
In refreshing the page the change was not persisted and in backend container logs I can see Not Found: /api/user/1/ at the time I click Update
I am on 2024w05 with gpu

@maciejmatuszak
Copy link

Switching back to non GPU image got the faces scan completed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants