Eclipse: "Update SVN cache" hangs and locks up

61,535

Solution 1

I faced the same issue and I tried to get out of this by disable most of performance setting for SVN in Eclipse:

  • Windows > Preferences > Team > SVN > Performance

OR (for latest versions): Windows > Preferences > Version Control (Team) > SVN > Performance

  • Disable: Computing deep outgoing state, Cache, persistent SSH

SVN Performance Settings in Eclipse

Solution 2

I just ran into this issue and was able to rescue it. This was with Zend Studio 10.5 which sits on Juno. I have about five projects in my workspace, one of which was open. I couldn't close the project because it was waiting for "Update SVN Cache" to complete.

  • With Eclipse closed, I went to my open project and via the command line ran "svn cleanup."
  • In workspace/.metadata/.plugins/org.eclipse.team.svn.core, I had a bunch of temp directories. I created a backup tarball, and then blew them all away.

That didn't fix anything. Finally I tried this:

  1. With Eclipse closed, I went to my project directory and renamed .project to project.xml.
  2. Reopened Eclipse, projects were closed. No SVN Update messages.
  3. Restarted Eclipse.
  4. Opened the project, but Eclipse balked at the missing .project file.
  5. Closed Eclipse.
  6. Went to my project directory and renamed project.xml back to .project.
  7. Restarted Eclipse.
  8. Opened the project. Smooth sailing. Was just able to commit a change without incident.

So far my workspace/.metadata/.plugins/org.eclipse.team.svn.core directory is still empty.

I don't know if the first two things I tried helped out at all, or if just renaming the .project file to force-close the project was all it took. Next time it happens (and there will be a next time) I'll try just force-closing the project and report back.

Solution 3

In my case I realized that a tortoise SVN explorer related windows was somewhere open. It probably locked the cache and eclipse was waiting for the unlock.

Not a direct answer to the question, but this might help for somebody making a similar mistake.

Solution 4

You're not the only one (see this bug report or this forum thread) but it's probably not a bug in Eclipse itself. Next steps:

  1. Get a thread dump to see whether this is a deadlock or a thread is waiting for something that never happens (in the bug report, it hangs in System.loadLibrary()). You can use jconsole for this, it comes with the SDK.

  2. Check all open projects in your workspace (that use SVN) with another SVN tool (command line svn or TurtoiseSVN if you're on windows) to make sure the data structures aren't corrupt.

  3. Get the latest version of Eclipse and/or the SVN plugin

  4. Try a different connector. Some people fare better with the JNI solution javahl, others with the pure-Java SVNKit.

Solution 5

  1. Windows > Preferences > Team > SVN > Performance
    • Disable: Computing deep outgoing state, Cache, persistent SSH
  2. Go to Preference -> General
    • Enable : Always run in background
    • Enable : Show heap status
    • Workbench Save interval (in minutes):9999
    • This will show your memory usage in eclipse.
  3. Then edit your eclipse.ini file and change Xms and Xmx values to these: -launcher.XXMaxPermSize 512m -Xms1024m -Xmx1024m
Share:
61,535
kevin
Author by

kevin

Updated on August 05, 2021

Comments

  • kevin
    kevin over 2 years

    Every time I start eclipse, the program begins doing this "Update SVN cache" thing but it will sit at 0% forever. I cannot perform any operations (such as checking out my projects, building them, or even running them) until this operation is completed (which never happens). Also, whenever I try to type anything in the editor, the whole program freezes and I have to kill the process.

    I have been searching google for the answer to this problem for days and have yet to come up with an answer. Has anyone else had a similar problem and found a solution?

    I'd like to add that I've tried re installing eclipse, all its plugins, and the jdk from scratch. Nothing seems to be working.

  • pfac
    pfac over 9 years
    Simply svn cleanup worked out for me. Just had to run it while in the root project directory. Thanks!
  • nanospeck
    nanospeck almost 8 years
    In Kepler you can I find it in Team> SVN> Label Decorations menu. 'Perfomance' menu is absent.
  • Eiko
    Eiko over 7 years
    Some explanation of why this should be done or solves the problem would be nice.
  • luis.espinal
    luis.espinal over 7 years
    The first set of changes: Disabling SVN caching prevents locking the SVN databases when you are working outside Eclipse while editing within it (which is pretty common.) It also prevents Eclipse from nosediving when scanning changes detected on the filesystem.
  • luis.espinal
    luis.espinal over 7 years
    The second set of changes builds and scans from interrupting your work as they get forked into the background. I wouldn't set my workbench save interval to 9999 (probably just 60 minutes), but I would surely increase it above 5 because it is very disruptive.
  • luis.espinal
    luis.espinal over 7 years
    On the second set of changes, when you enable to show heap status, you can see where the jvm memory is going, and when you are going low (it helps explains when and what makes Eclipse to crawl.)
  • luis.espinal
    luis.espinal over 7 years
    The last set of changes depends on how much memory you have available and other things you have running. But for development, this seems a good set of values (out of many possible ones.)
  • Renaud is Not Bill Gates
    Renaud is Not Bill Gates about 6 years
    @nanospeck I've the same problem with Elicpse Oxygen the Performance menu is missing
  • Ashish
    Ashish almost 6 years
    there would be two SVN under team or you are not using correct svn plugin