PhpStorm keeps indexing over and over again

Answered

PhpStorm keeps reindexing over and over again.

Tried to restart the app, but wouldn't solve the problem.

17
51 comments

FILE | invalidate caches and restart seems to have fixed it.

34

THIS FIXED IT FOR ME (MAC User)

The problem was that my projects were under the "Documents" folder. I moved them in my home folder and that fixed it.

I can't believe I was plagued by this problem for months and the solution was so simple.

why? (my speculation, didn't do proper research)

In recent macOS, Apple did something to protect some folders like Desktop, Downloads, Documents (you surely noticed that asks permissions for apps accessing files in those folders). This something probably causes the problem, as PhpStorm maybe isn't able to read its files in some edge case. Don't know why it happened only with PhpStorm and not WebStorm for example, maybe someone will explain the correct reason and everything will be clear

 

6
Avatar
Permanently deleted user

@Rémy 

Works ! 

The issue occured in my case when i switched project locations.

1
Avatar
Permanently deleted user

Go to File -> Invalidate Caches and Restart.  Fixed my issue - https://www.prodjex.com/2018/03/phpstorm-stuck-re-indexing/

1
Avatar
Permanently deleted user

This does not help at all! It keeps indexing node_modules even when it's excluded. It all started again since two updates to php storm.

PhpStorm 2019.1.2
Build #PS-191.7141.52, built on May 8, 2019
JRE: 1.8.0_202-release-1483-b49 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

1
Avatar
Permanently deleted user

Invalidating caches didn't work for me.

What solved my case was:

  1. Exit all instances of JetBrains (PhpStorm, PyCharm and Datagrip in my case)
  2. rm -rf .idea on all projects with indexing loop
  3. I've also rolledback a version of phpstorm that I've installed the day before, may have also helped.
1

For anyone on MacOS Catalina. I was having an issue where every time I'd come back to PhpStorm from a different Application, it'd close all the open tabs and re-index. I didn't have this problem before upgrading my OS. I tried the "Invalidate Caches / Restart..." but that didn't work. The one thing that did seem to work for me was going into System Preferences -> Security & Privacy -> Privacy -> Full Disk Access and giving PhpStorm full access instead of the scoped access that it had which in my case was just the "Documents" folder. This solved the issue for me.

PhpStorm 2019.2.4
macOS 10.15.1

1

This is incredibly surprising that the indexing issues have been persisted for 6years. I feel sad that I recommended buying this product in my company and now everyone in my team is just frustrated with this indexing issue despite having the latest version installed. All I see everywhere is "Invalidate Cache and Restart" but it does not work. Some solutions say Exclude the directories but still indexing happens every time. I have to keep the indexing program running overnight so that I can use the IDE next morning.

Sad part is if you don't index then Search doesn't work either.

1

An alternative to the above without moving your folder is to grant the Rider application "Full disk access" in System Settings -> Privacy & Security. This worked for me in JetBrains Rider (I have not tested PHPStorm though, but I assume it would work as well), however similarly to the above, it doesn't happen in WebStorm.

1

Nope still not working. Upgraded last evening, it reindexed everything, this morning I start same project and again it indexes everything....SSD killer, time killer, nerves killer.

1
Avatar
Permanently deleted user

@Rémy thanks it works for me

0
Avatar
Permanently deleted user

Worked for me to. Thanks!

0
Avatar
Permanently deleted user

@Rémy THANK YOU!

0
Avatar
Permanently deleted user

Yep, that did the trick for me also. Thanks.

0
Avatar
Permanently deleted user

Same problem, same solution for RubyMine. Thank you

0
Avatar
Permanently deleted user

Works, thanks a lot!

0

Works, many thanks!

0
Avatar
Permanently deleted user

Thanks, this solves my issue. I moved project locations.

0

Yes, seems to have fixed the problem. Wow did that problem make it hard to concentrate.

PhpStorm 2017.3.6
Build #PS-173.4674.46, built on March 15, 2018
JRE: 1.8.0_152-release-1024-b15 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6

0
Avatar
Permanently deleted user

Thanks Remy!

0
Avatar
Permanently deleted user

File -> Invalidate Caches and Restart is not solving the problem for me!

Manjaro Linux (latest)

WebStorm (latest)

Angular (latest, huge project)

0

Invalidate Caches / Restart is not working for me... I have cloned a new copy from a repo and PyCharm start to "updating indices". Why does it scan from /home/my-home and not only the project's directory?

0
Avatar
Permanently deleted user

Invalidate Caches / Restart is not working for me :(

PhpStorm 2018.1
Build #PS-181.4203.565, built on March 28, 2018
JRE: 1.8.0_152-release-1136-b20 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.5
0
Avatar
Permanently deleted user

This is the phpstorm version I'm using, and the issue still exists.

PhpStorm 2018.1.6
Build #PS-181.5281.35, built on June 14, 2018
Licensed to Curve Dental / Hung Nguyen
Subscription is active until February 22, 2019
JRE: 1.8.0_152-release-1136-b39 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.4.0-31-generic

0
Avatar
Permanently deleted user

Did not work for me.

PhpStorm 2018.2.2
Build #PS-182.4129.45, built on August 22, 2018
JRE: 1.8.0_152-release-1248-b8 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.12.6

0

The same happens today with `node_modules` after `git pull && yarn install`. Yesterday it just worked as usual. After resetting to previous commit and invalidating cache usual indexing was restored. But we should continue work with `new node_modules`.

 

PhpStorm 2019.2
Build #PS-192.5728.108, built on July 24, 2019

Runtime version: 11.0.3+12-b304.10 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 5.0.0-23-generic
GC: ParNew, ConcurrentMarkSweep
Memory: 725M
Cores: 4
Registry: run.processes.with.pty=TRUE
Non-Bundled Plugins: com.alayouni.ansiHighlight, com.intellij.ideolog, org.jetbrains.plugins.go-template, org.jetbrains.plugins.stylus, com.stylint, com.jetbrains.lang.ejs, de.espend.idea.laravel, com.intellij.kubernetes, org.zalando.intellij.swagger, ru.adelf.idea.dotenv

0

Fixed in WebStorm 2019.3 EAP 193.4099.10 for a node_modules infinite indexing.

 

Thanks, JetBrains

0

Thank @Fermanjii. I've been having the same problem. Does anyone know which path to use for PHPStorm.app if we're using JetBrains Toolbox? I'm trying ~/Applications/JetBrains Toolbox/PHPStorm.app, even though that's not really where it is (maybe it's a pointer, I'm not sure).

0

You could always find out the installation path for a specific app in JetBrains Toolbox by clicking the "gear" icon near the app name and check the "Installation path" field.

Hope it helps!

0

I'm still having this same problem. The darned thing keeps indexing, and it's starting to drive me a little nuts. I updated to 2020.1.2 this morning, but it's still doing it. I'm in the middle of typing some code, and I don't see it on the screen. Then I look down and the thing is indexing again. Why? I've done the invalidate caches, deleted the .ideas directory.... I'm on MacOS 10.15.4. 

0

Please sign in to leave a comment.