34

Each time I do a make (a Java project) in IDEA, the compile process is hanging stating "Finished, saving caches". I have to kill this process before I can continue. I tried to use File -> Invalidate Caches without success.

Any ideas?

cretzel
  • 19,864
  • 19
  • 58
  • 71
  • 1
    Weird. U tried a machine restart? Check that the file location for your caches is writable? Does it happen on any IDEA project, or just one? – vikingsteve Dec 18 '13 at 13:05
  • Machine restart did not help. I added more ram for the InteliJ JVM, but still it hangs... any ideas? – Thomas Jun 03 '15 at 11:56
  • 2
    The problem and solution is described here in more detail: http://stackoverflow.com/questions/30625785/intellij-freezes-for-about-30-seconds-before-debugging – Thomas Jun 05 '15 at 20:35
  • Is this on "Make" or is it on "Debug" which happens to do a make and then does a network connection to a newly spawned VM? Because if on Debug, see http://stackoverflow.com/questions/30625785/intellij-freezes-for-about-30-seconds-before-debugging since that is the real problem. – Jayson Minard Apr 25 '17 at 10:34

7 Answers7

45

One more workaround is adding your mac's hostname to /etc/hosts file along with localhost like the following:

127.0.0.1 localhost <hostnameOfMac>
::1       localhost <hostnameOfMac>

This solved the problem for me.

Jeff
  • 407
  • 4
  • 17
Manyata Goyal
  • 604
  • 5
  • 13
6

According to JetBrains,

IntelliJ IDEA caches a great number of files, therefore the system cache may one day become overloaded. In certain situations the caches will never be needed again, for example, if you work with frequent short-term projects. Also, the only way to solve some conflicts is to clean out the cache.

Go to the menu File | Invalidate Caches/Restart and take it from there.

https://www.jetbrains.com/help/idea/2016.3/cleaning-system-cache.html

blamblambunny
  • 757
  • 8
  • 19
  • 1
    How did this answer receive +6, when the never-edited OP clearly states _"I tried to use File -> Invalidate Caches without success."_ – Det Sep 22 '22 at 20:58
3

I got this same problem after installing Bitdefender. The suggestion with adding those lines in /etc/hosts doesn't solve it in my case.

RBrink
  • 179
  • 2
  • 4
1

I'm in the same boat as RBrink. Company recently installed Bitdefender on all Macs and the hostname solution doesn't work.

Only workaround I've been able to use to get me past it is to simply click the little 'X' next to where is says "Finished, saving caches". It's annoying, but it works. Wish there was a better option, but I can't for the life of me figure it out.

Aston
  • 41
  • 1
  • 2
  • 8
1

A colleague of mine also had this problem during debugging (Intellij frozes on 'finished, updating caches'). His server was configured to 'update classes and resources' on the 'on frame deactivation' option. Once he set this option to 'Do nothing' he could switch to another program to look something up and continue to debug later on.

RogierE
  • 26
  • 2
0

Just based on circumstances, I get the impression it might be SBT related. When I have sbt running in intellij (to run a play server), I get this issue. If I restart intellij, the issue goes away.

Admittedly, its hard to prove this connection, but after three uses of this solution, it appears valid.

(The hosts solution did not work for me)

Jake
  • 4,322
  • 6
  • 39
  • 83
0

@manyata-goyal 's solution worked for me.

Adding steps for those who are trying this on a Windows system:

  • Get your hostname: Go to My PC -> Properties (System Properties) -> scroll down to 'Full computer name' -> copy the full computer name
  • Edit hosts file: Go to C:\Windows\System32\drivers\etc open hosts file
  • Uncomment the lines and add hostname as mentioned in the answer above
Amita
  • 944
  • 1
  • 8
  • 20