why is photoanalysisd not scanning my library in Big Sur?

I installed Big Sur when it became available - firstly, big improvements on Catalina!


I've some big photo libraries, and initially there was a big acceleration in scanning of the one set as System Photo Library. Then dead stop - nothing now for a week. Still plenty to scan... I've tried setting other libraries as the System Photo Library, both big and small libraries in terms of photo count, again, nothing. And photoanalysisd shows no work on the Activity Monitor.


I'm leaving it overnight with no other apps running. The libraries are on an external hard drive - this hasn't previously been a problem in their being scanned. And wasn't after the initial installation of Big Sur.


I realise most people want to stop photoanalysisd and related - I get it. I want to get the job done by a useful tool, then I might seek to block it. But I do at the moment want it running - and it isn't.


Any advice appreciated!


J

iMac 27″, macOS 11.0

Posted on Nov 28, 2020 12:42 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 12, 2021 4:14 AM

*Another Possible Solution*


After troubleshooting this for a looong time I discovered that the issue was with my specific library, not an issue with the system. Something to do with old caches, leftovers, and general garbage from having a large, old library. Here’s what worked for me:


PLEASE EITHER MAKE A DUPLICATE OF YOUR LIBRARY OR A BACKUP BEFORE DOING ANY OF THIS. I DID SCREW IT UP ONCE AND LOST ALL MY ALBUMS AND TAGS.


You want to first un-hide invisible files, go to the Terminal and type:

defaults write com.apple.finder AppleShowAllFiles -boolean true
killall Finder


Quit Photos.


In the Finder, select your library, right click and go to Show Package Contents.


You’ll see several folders, we’re going to focus on database, private, and resources.


In the database folder:

  • Delete any hidden folders
  • Open the search folder, delete any files inside
  • Back in the main database folder, delete anything with a .db, .plist, or no extension
  • IMPORTANT: leave anything with a .sqlite extension alone


In the private folder:

  • You’ll see several folders called com.apple.something, delete the contents of these folders


In the resources folder:

  • Delete the contents of the caches folder
  • Delete the contents of the journals folder


Restart, open the library, quit Photos, and you should start to see some activity. My computer scanned ~20k photos in one day.

Similar questions

55 replies

Jan 24, 2021 6:56 AM in response to doncarlosdon

Hi Don,


My apologies, I should have clarified that Step 3 is all done from the Finder app and that, for each of the directories listed, you should be able to navigate to them using the Go, Go to Folder option in Finder.


Furthermore, the tilde character is shorthand (on most Unix-based systems) for "the home directory of the current user". Therefore, ~/Library is equivalent to the Library folder in the home directory for your user (e.g. /Users/bob/Library). This is where most of the user-specific settings on your Mac are stored.


The /Library (e.g. without the tilde) is elsewhere on your Mac and is where the system-wide settings are stored (i.e. apply to all users).


In any case, if you use the Go, Go to Folder menu option in Finder, for each of the directories listed in Step 3b, that should give you what you need to proceed.


Best of luck!

Jan 25, 2021 3:51 PM in response to matthunsberger

Good question. During the time that my library was *not* detecting new faces, I did not see much activity with photoanalysisd and the total CPU Time for that process ever went much beyond 1-2 minutes, after several days of waiting.


However, interestingly, I just checked Activity Monitor now and can see that the CPU Time for photoanalysisd says 20 minutes, which is considerably more than before.


Therefore, even though the Apple engineer said that's not an indicator of anything, I think I disagree. If your photos are being scanned, you really should be seeing more CPU Time (i.e. more than 1-2 mins) being recorded in Activity Monitor. If you are not, this does suggest that it's not actually scanning.

Jan 2, 2021 11:25 PM in response to JR-Jones

Just wanted to row in to this problem.

I have a 200000+ Photos Library all in "scanned state" before upgrading to Big Sur.

After upgrading, only newly imported photos did not get scanned.

So I decided (before reading this thread) to repair my Library.

I ran the repair/restore an now i have 210000 photos remaining to be scanned and 0 done.

I have the feeling, that "Faces" is completly broken in 11.1.

Also, many faces that were named before the repair aren't named any more after the repair/restore.

So, waiting for the next update...

Jan 3, 2021 3:13 AM in response to jmernin

Hello,


thanks for you reply.

I'm also not too worried about the missing faces, because I'm sure, once scanning is functional again, 99% will be re-recognized.

If not, I still have the pre-Big Sur Library untouched on the old external Hard-Drive.

I did some further tests on my wifes new M1 MBP and created a new Library on the internal SSD there, imported about 20 Photos, closed Photos.app and let it sit there connected to power for a few hours.

0 photos scanned...


Is face recognition working for anybody with 11.1?

I still have another Play-Mac in the Beta-Program. I'm about to install 11.2 there to see, if we get a new Photos.app-Vesion...


Best Regards


Richard

Jan 5, 2021 3:58 PM in response to Richard Mayer

I've had a couple of follow-up phone calls with Apple Support in recent days and they had me run a Data Capture app (for a few minutes) which they're now going to analyze, to see if they can determine what is (not) going on. I'll report back on any updates they send me.


I also read some other support threads that suggested using the OSX Console app to shed some light on what the photoanalysisd process might be doing. While this did reveal some errors, it's not fully clear to me if those are normal or not (i.e. I'm not overly familiar with what "normal" console output for that app looks like).


My cloned library has still not scanned a single photo either, so everything still points to facial scanning simply being broken on 11.1.

Jan 5, 2021 4:03 PM in response to jmernin

I also created a brand new library and imported 33 photos to it, and observed the following messages in the People view:


"Photos will continue scanning your remaining 33 photos when you're not using the app and your Mac is connected to power."

Once again, the definition of "not using" is unclear here.


"To finish scanning your library, quit Photos and make sure your Mac is connected to power"

This is clearer, though, and does suggest that quitting the application should invoke the scanning features.


I'll leave the new library overnight to see if any of the 33 imported photos are scanned.

Jan 25, 2021 3:34 PM in response to _MoonDog_

Well looks like there is some movement on a self solution..........but I am not comfortable adding/deleting and moving things, with out an apple tech guiding me.


Way back, two different apple media techs told me a patch was forthcoming in an update. Don't know how long that will be, but I will wait until apple tells me different.


But good luck to all of you that venture the direction of changing things. Many solutions are found that way I know. I just don't like fiddling with a working iMac.


So Me? will just wait.


As I said before, I can import new photos to the external library but no scan for people faces for those newly imported pics. .


I think a key would be finding out how to handle the external library, I never download anything to the internal photos library (but ....that always worked with every update until Big Sur) I only use my Mac as a way of importing new photos to the external Photo Library where over 100 K of photos sit. Both the internal Photo library version is 6.0 and the external Photo Library is version 6.0.


I am just very careful with changing anything in the Mac without Apple approval or updates issued by Apple. It's easy to get carried away with some things IMHO. Recently I encountered a problem with my mac's wifi. Reading advice and solutions and fixes, that I tried for several weeks (and even a consideration to replace the wifi card (Not an easy and a potentially dangerous task, opening this 2017 clam). By simple accident the wifi showed up after bumping into my wireless router. The two inch move fixed it. Someone had bumped it before. Go figure. Occam's razor.


I will watch for upcoming posts with great interest.


Best Regards all. And wish you adventurous ones and successful and not harmful solution


Don



Mar 15, 2021 2:50 PM in response to jmernin

@onlyhuman2 wrote:

photoanalysisd has only run for 13 minutes total over the last 24 hours

That's a similarly crappy under-utilization as the one I experienced.


@matthunsberger:

1) Wow, will try out your method of sweeping old DB and cache files within the Photo Library Bundle. But only when having a proper backup.

2) Instead of the hacky way to show/hide hidden Files in Finder, please use a shortcut which as of macOS 11 Big Sur finally is integrated into Finder. Press CMD-SHIFT-DOT in Finder to toggle the visibility of hidden files. 👍


@all

Apple does not expose that wonderful shortcut in the menu bar nor mentions it in their official documentation at Mac keyboard shortcuts (HT201236) 🤓😮 I only learned about it at an unofficial source.

Go to the end of the linked article to the section "Helpful?", click "No!" and then give a comment that you would like that very useful shortcut to show up there. I did so in my words. You do it in your words. And hopefully soon they will add it 😉


Nov 29, 2020 9:21 AM in response to léonie

Hi there,


what I'm seeing to tell me there's a lot to scan is a message in People '0 Photos Scanned

Photos will continue scanning your remaining 11,242 photos when you're not using the app and your Mac is connected to power.


I've tried 'not using the app' as both reduced and as quitted.


The drive is wired into the back of the Mac (Thunderbolt port), permanently so, so it's read when the Mac is booted.


All the files in the library are JPEG - this shouldn't present a problem. I have very few video files in any libraries, those that are there are .mov containers and invariably from a current or previous iPhone.


Regarding errors, yes, I agree, I usually try to convert, or just bin them.


Thanks for your help,


J



Dec 28, 2020 12:34 PM in response to doncarlosdon

Thanks for the comprehensive reply, Don.


In terms of why my Photos app is not showing any photos being scanned, remember that my library was fully scanned and up-to-date before the Big Sur upgrade, so I would not expect to see that message most of the time anyway. However, I would, as you say, expect to see it (briefly) after importing a couple of new photos, but I don't - that's the the thing. It's like it simply doesn't realise there are new photos to be scanned.


I will look to contact Apple support to report the issue too.

Dec 29, 2020 11:12 AM in response to jmernin

The "Updating People" message is still appearing at the bottom of People view but it seems to be impossible know if/when Photos is actually scanning for faces. I've been keeping an eye on the "photoanalysisd" process using Activity Monitor but rarely see it registering much CPU usage beyond 1-2 minutes, no matter what way I leave the Photos app (i.e. running or not, in the foreground or background). This really is a terrible user experience.

Jan 2, 2021 1:01 PM in response to jmernin

Still no resolution to my issue. The most recent call with Apple Support suggested that quitting the Photos app (and powering the laptop from battery, with settings configured to prevent it from sleeping) is actually the best way for the faces to be processed in the background. However, after another 2 days of that, I'm still seeing the same issues. More updates as I have them.

Jan 3, 2021 3:04 AM in response to Richard Mayer

Hi Richard,


I tried this (on a copy of my library) too and saw the same outcome. Repair complete but zero photos scanned and a bunch of photos missing faces that were present beforehand. That's a general observation I've made with the repair process, though, where it seems to forget certain faces in certain photos post-repair (perhaps the ones manually added).


While it's good that our observations are similar (i.e. supporting evidence that a systemic issue is at play), it's bad that something so fundamental is not working.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

why is photoanalysisd not scanning my library in Big Sur?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.