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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

face:background_job crashed by 8/8 #711

Closed
fr3ddy-sudo opened this issue Nov 21, 2023 · 6 comments
Closed

face:background_job crashed by 8/8 #711

fr3ddy-sudo opened this issue Nov 21, 2023 · 6 comments

Comments

@fr3ddy-sudo
Copy link

Hey, Thanks for reporting issues back to Nextcloud Face Recognition. Please, try to complete this report in detail so we can help you easier. 馃槃

Make sure you read all the documentation, and the FAQ, and that the issue has not been reported before. 馃槈

Expected behaviour

Backround_job runs normal

Actual behaviour

Backround_job crashed by 8/8

Steps to reproduce

sudo -u apache php /usr/share/nextcloud/occ face:background_job -t 900

Server configuration

  • Operating system: Fedora 39

  • Pdlib version: 1.1.0

  • How is DLib installed: Make sure it is working correctly with this tool
    Test runs without Problems

  • PHP version: 8.2.12

  • Web server: apache

  • Database: mariadb

  • Nextcloud version: 27.1.3

Client configuration

  • Browser: Chrome

  • Operating system: Fedora 39

Logs

Background task log with debug.

sudo -u apache php occ -vvv face:background_job
 sudo -u apache php /usr/share/nextcloud/occ face:background_job  -vvv 
1/8 - Executing task CheckRequirementsTask (Check all requirements)
        System: Linux
        System memory: 32945115136
        PHP Memory Limit: 2147483648
        Clustering backend: pdlib
        Image Backend: Imagick
2/8 - Executing task CheckCronTask (Check that service is started from either cron or from command)
3/8 - Executing task DisabledUserRemovalTask (Purge all the information of a user when disable the analysis.)
yielding
4/8 - Executing task StaleImagesRemovalTask (Crawl for stale images (either missing in filesystem or under .nomedia) and remove them from DB)
        Skipping stale images removal for user fr3ddy as there is no need for it
5/8 - Executing task CreateClustersTask (Create new persons or update existing persons)
        Found 8 faces without associated persons for user fr3ddy and model 1
        Oldest face without persons for user fr3ddy and model 1 is from 2023-11-21 05:35:54
        Clusters already exist, estimated there is no need to recreate them
yielding
6/8 - Executing task AddMissingImagesTask (Crawl for missing images for each user and insert them in DB)
        Skipping full image scan for user fr3ddy
7/8 - Executing task EnumerateImagesMissingFacesTask (Find all images which don't have faces generated for them)
yielding
8/8 - Executing task ImageProcessingTask (Process all images to extract faces)
        NOTE: Starting face recognition. If you experience random crashes after this point, please look FAQ at https://github.com/matiasdelellis/facerecognition/wiki/FAQ

Web server error log

Web server error log
Insert your webserver log here

none

Nextcloud log (data/nextcloud.log)

Nextcloud log
Insert your Nextcloud log here

none

Browser log

none
@kuyper
Copy link

kuyper commented Dec 28, 2023

Hi, I might have a similar problem - it seems like nothing happens when I start the background job and I have lots of images that seemingly aren't analysed.

How can I find out what's happening? I don't find anything in nextcloud's logs and I have no idea how to get any error message out of the face recognition module itself.

I would very much like to find out what's going on.

My environment is nextcloud 27.1.5 in a docker image from the official images

@matiasdelellis
Copy link
Owner

Hi @fr3ddy-sudo

        Found 8 faces without associated persons for user fr3ddy and model 1
        Oldest face without persons for user fr3ddy and model 1 is from 2023-11-21 05:35:54
        Clusters already exist, estimated there is no need to recreate them

It found 8 new faces, but it says that it is not going to create clusters... that is because it tries not to recreate it continuously since it is a task that can consume important resources. The process simply has a two-hour window to recreate the clusters. After these two hours you will get the new faces/clusters.

ps.: sorry the delay.. I'm very busy.. 馃槥

@brccabral
Copy link

I am going through the same. I am using Nextcloud in a Docker. I was able to edit "apps/facerecognition/lib/BackgroundJob/Tasks/ImageProcessingTask.php" and added some log messages. In \ImageProcessingTask.execute() the value $images = $context->propertyBag['images']; is returning empty, even though I have uploaded many images.

I have another Nextcloud running directly on Ubuntu and Facerecognition runs fine. So, it is something related to the docker installation.

I used this method to create the docker instance https://github.com/juliushaertl/nextcloud-docker-dev

@brccabral
Copy link

I turns out in my case I didn't enable the user to "Analyze my images and group my loved ones with similar faces". Now it is working.

@fr3ddy-sudo
Copy link
Author

fr3ddy-sudo commented May 14, 2024

Nothing changed by me Now NC29 on a Debian System

1/8 - Executing task CheckRequirementsTask (Check all requirements)
System: Linux
System memory: 67132043264
PHP Memory Limit: 4294967296
Clustering backend: pdlib
Image Backend: Imagick
2/8 - Executing task CheckCronTask (Check that service is started from either cron or from command)
3/8 - Executing task DisabledUserRemovalTask (Purge all the information of a user when disable the analysis.)
yielding
4/8 - Executing task StaleImagesRemovalTask (Crawl for stale images (either missing in filesystem or under .nomedia) and remove them from DB)
Skipping stale images removal for user fr3ddy as there is no need for it
5/8 - Executing task CreateClustersTask (Create new persons or update existing persons)
Found 0 faces without associated persons for user fr3ddy and model 1
Clusters already exist, estimated there is no need to recreate them
yielding
6/8 - Executing task AddMissingImagesTask (Crawl for missing images for each user and insert them in DB)
Skipping full image scan for user fr3ddy
7/8 - Executing task EnumerateImagesMissingFacesTask (Find all images which don't have faces generated for them)
yielding
8/8 - Executing task ImageProcessingTask (Process all images to extract faces)
NOTE: Starting face recognition. If you experience random crashes after this point, please look FAQ at https://github.com/matiasdelellis/facerecognition/wiki/FAQ

all Pictures until 07.04.24 are correct recognize.

all new pictures dont, and the code i used to force the recognize

sudo -u www-data /usr/bin/php --define apc.enable_cli=1 -f /var/www/nextcloud/occ face:background_job -t 900 --crawl-missing

The "--crawl-missing" option does not exist.

Dont work anymore

@fr3ddy-sudo
Copy link
Author

Hi, your Information in
[https://github.com//discussions/716#discussioncomment-9204099]

solved my problem, with your bash script everything runs smooth thanks

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

No branches or pull requests

4 participants