You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which Docker container are you using to run Nextcloud? (if applicable)
How much RAM does your server have?
4
What processor Architecture does your CPU have?
x86_64
Describe the Bug
Stopped processing photos
Expected Behavior
I expected the process to go on as from the beginning
To Reproduce
Didn't seem to do anything out of the ordinary, just stopped checking, waiting for some kind of line. Tried running it through occ recognize:recrawl but nothing happened
my face recognition stopped too, but object recognition still working. It happened after a memory exceeding 512M error, probably caused by lacking APCu enable in php.ini I'm not sure. I tried disabling classification and re-enable it. Last time I disable the whole plugin and re-enable it seems to work.
I've narrowed this issue down to Classifier.php (at least for me) . Seemingly if there's a failure within the Classifier.php at certain points, the face classifier que will not progress anymore. Specifically I had issues with getImageSize() (line 93) and getImagePreview() (line 241) causing uncaught errors.
Still, I think such errors shouldn't permanently halt the que which, I think, is the main issue at hand here.
If you do not delete the classify cron jobs in the database, it will star where it stoped. But, if the file which caused the process to stop still exist in the jobs, probably it will stop again. You need to resolve the errors in the log first.
After a cron job raises an uncaught exception, Nextcloud will pause it for 12h, but it should restart itself automatically after that. I'll try to catch those errors.
@er-epr / @m1n3nfux does re-enabling / reinstalling makes the process start from scratch, or does it pick-up where it left off?
I remember it reprocessing every file. In the settings panel it always said "Last classification: x seconds ago" for Object recognition, but it did not add any tags for like a day. It seems like it does not check for the "Tagged by recognize v3.0.0" Tag. Though the behaviour can have other reasons too, i'm just guessing.
FWIW, filtering out 0 byte files helped some but, still, corrupt files will cause an uncaught exception. My naïve attempt at catching with "\Exception" didn't help.
[PHP] Error: getimagesize(): Corrupt JPEG data: 1388 extraneous bytes before marker at /var/www/nextcloud/lib/private/legacy/OC_Image.php#598 at <<closure>>
0. <<closure>>
OC\Log\ErrorHandler::onError()
1. /var/www/nextcloud/lib/private/legacy/OC_Image.php line 598
getimagesize()
2. /var/www/nextcloud/lib/private/legacy/OC_Image.php line 665
OC_Image->checkImageSize()
3. /var/www/nextcloud/lib/private/Preview/Image.php line 52
OC_Image->loadFromFile()
4. /var/www/nextcloud/lib/private/Preview/GeneratorHelper.php line 65
OC\Preview\Image->getThumbnail()
5. /var/www/nextcloud/lib/private/Preview/Generator.php line 343
OC\Preview\GeneratorHelper->getThumbnail()
6. /var/www/nextcloud/lib/private/Preview/Generator.php line 162
OC\Preview\Generator->getMaxPreview()
7. /var/www/nextcloud/lib/private/Preview/Generator.php line 114
OC\Preview\Generator->generatePreviews()
8. /var/www/nextcloud/lib/private/PreviewManager.php line 185
OC\Preview\Generator->getPreview()
9. /var/www/nextcloud/apps/recognize/lib/Classifiers/Classifier.php line 246
OC\PreviewManager->getPreview()
10. /var/www/nextcloud/apps/recognize/lib/Classifiers/Classifier.php line 78
OCA\Recognize\Classifiers\Classifier->getConvertedFilePath()
11. /var/www/nextcloud/apps/recognize/lib/Classifiers/Images/ClusteringFaceClassifier.php line 83
OCA\Recognize\Classifiers\Classifier->classifyFiles()
12. /var/www/nextcloud/apps/recognize/lib/BackgroundJobs/ClassifyFacesJob.php line 41
OCA\Recognize\Classifiers\Images\ClusteringFaceClassifier->classify()
13. /var/www/nextcloud/apps/recognize/lib/BackgroundJobs/ClassifierJob.php line 70
OCA\Recognize\BackgroundJobs\ClassifyFacesJob->classify()
14. /var/www/nextcloud/apps/recognize/lib/BackgroundJobs/ClassifyFacesJob.php line 33
OCA\Recognize\BackgroundJobs\ClassifierJob->runClassifier()
15. /var/www/nextcloud/lib/public/BackgroundJob/Job.php line 78
OCA\Recognize\BackgroundJobs\ClassifyFacesJob->run()
16. /var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php line 103
OCP\BackgroundJob\Job->start()
17. /var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php line 93
OCP\BackgroundJob\TimedJob->start()
18. /var/www/nextcloud/cron.php line 152
OCP\BackgroundJob\TimedJob->execute()
at
2023-02-02T03:30:02+00:00
This is the one for a corrupt JPEG. I'm using NextcloudPi just because they have a ready-made script for setting up an LXC. It's possible that their bundled version of preview generator plays a role in my case..?
Activity
xyonium commentedon Jan 26, 2023
my face recognition stopped too, but object recognition still working. It happened after a memory exceeding 512M error, probably caused by lacking APCu enable in php.ini I'm not sure. I tried disabling classification and re-enable it. Last time I disable the whole plugin and re-enable it seems to work.
jcv8-dev commentedon Jan 27, 2023
I had the same problem, but running occ recognize:classify after reinstalling the app fixed it for me.
MB-Finski commentedon Jan 30, 2023
I've narrowed this issue down to Classifier.php (at least for me) . Seemingly if there's a failure within the Classifier.php at certain points, the face classifier que will not progress anymore. Specifically I had issues with getImageSize() (line 93) and getImagePreview() (line 241) causing uncaught errors.
Still, I think such errors shouldn't permanently halt the que which, I think, is the main issue at hand here.
shalak commentedon Feb 2, 2023
@er-epr / @m1n3nfux does re-enabling / reinstalling makes the process start from scratch, or does it pick-up where it left off?
xyonium commentedon Feb 2, 2023
shalak commentedon Feb 2, 2023
How can I access the recognize logs? I don't see anything from it in the global
Loggingmenu...marcelklehr commentedon Feb 2, 2023
After a cron job raises an uncaught exception, Nextcloud will pause it for 12h, but it should restart itself automatically after that. I'll try to catch those errors.
jcv8-dev commentedon Feb 2, 2023
I remember it reprocessing every file. In the settings panel it always said "Last classification: x seconds ago" for Object recognition, but it did not add any tags for like a day. It seems like it does not check for the "Tagged by recognize v3.0.0" Tag. Though the behaviour can have other reasons too, i'm just guessing.
marcelklehr commentedon Feb 2, 2023
the classify and recrawl commands are rather dumb, indeed.
MB-Finski commentedon Feb 2, 2023
FWIW, filtering out 0 byte files helped some but, still, corrupt files will cause an uncaught exception. My naïve attempt at catching with "\Exception" didn't help.
marcelklehr commentedon Feb 2, 2023
@MB-Finski What's the error stack?
MB-Finski commentedon Feb 2, 2023
This is the one for a corrupt JPEG. I'm using NextcloudPi just because they have a ready-made script for setting up an LXC. It's possible that their bundled version of preview generator plays a role in my case..?
marcelklehr commentedon Mar 19, 2023
Closing this for now as the surface issue was fixed. If this comes up again, let me know.