Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Spotlight Indexing Causes System Freeze

In searching the forums, this seems to be a not uncommon problem. Many of those issues seem to be related to corrupted files, or at least a file that spotlight is unable to index. This causes the whole system to freeze up and you have to hard boot out of it. Here's how I fixed it, in case others have the same issue. The main concern is to find the corrupted file(s), but there's not really a utility to do that, so I used this method. It's probably best if you read this whole thing before attempting to do it. And expect it to take you several hours at least.


  1. As soon as possible after you boot up, go to terminal and run “sudo mdutil -a -i off” (without quotes) to turn off Spotlight indexing. This only stops indexing until you re-boot again, so you have to do this each time you reboot until the issue is resolved. You'll probably need to be in an Administrator account to do most of these steps. It may ask for your password when you're running a "sudo" command.
  2. In System Preferences, Spotlight, Privacy tab, add all root level directories (folders) except for one. I suggest you start with Applications first, then Users second, as I would guess most problems occur there. What you're trying to do here is narrow down the problem to one of those directories. You probably have Applications, Library, System, Users, and maybe a couple others. So choose one of those to leave out, but add all the others to the privacy tab.
  3. In Terminal, run “sudo mdutil -E /” (no quotes). This will delete existing Spotlight indexes.
  4. In Terminal, run “sudo mdutil -a -i on” (no quotes) to turn indexing back on and begin the indexing.
  5. Now just sit back and wait for the system to freeze up. If it doesn’t, then the problem wasn't in the directory that you left out of the Privacy tab.
  6. Now do step 1 through 3 again, but in step 2, add the first directory you used to the Privacy tab and remove one of the others. Keep doing this until your system freezes, and you’ll know the file is in that directory. Then you can start adding sub-directories until you narrow it down further. Remember that you might have more than one bad file in more than one directory.
  7. Once you're doing subdirectories of the Users directory, you might have to go to another user account (assuming you have more than one), and use that account to move the directories to and from the Privacy tab. This is because you can't mess with one user's files/folders from another user's account. There are probably ways to do this in Terminal, but this is a simpler method. However, you'll probably still have to jump back to the Admin user's account to do the terminal commands. Also, it's more than likely that the problem is in the Desktop or Documents directory of the user's directory.
  8. Once you've narrowed it down to a particular folder, it's sometimes still hard to know which file is the bad one. One way to find out is to open a Finder window, turn it to columns view, and slowly scroll through each file. The system will try to display a quick view icon of each file. Often, it's unable to do so with a corrupted file and it will either hang on that file, or freeze the whole system up again.
  9. Another way that I inadvertantly discovered is to move files to Dropbox. As it tries to move them, it will hang on a bad file. Probably iCloud and other cloud-based services would work also.
  10. One last method that I've used in the past is to use Terminal to display hidden files in Finder (google this to learn how). There are usually one or two files in each directory that begin with a period (.), and these are normal. But there might also be some other file that's corrupted enought that it won't even normally display in Finder, but will display when you turn on hidden files.


Good luck, and expect to spend a while at this. It took me about six hours. And I don't take credit for these instructions; I did some searching until I found this out.

iMac, OS X Mavericks (10.9), mid-2011 12GB RAM

Posted on Nov 16, 2013 6:01 AM

Reply

There are no replies.

Spotlight Indexing Causes System Freeze

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