Eclipse: "Update SVN cache" hangs and locks up
Asked Answered
P

15

41

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.

Personable answered 18/6, 2012 at 15:52 Comment(4)
Yeah, well, that's not exactly up to mePersonable
You know that you can tell Git to talk to SVN for you? So you can use Git for yourself and still appear to be using SVN?Redhanded
Hmmm. I seem to have fixed it. I updated to the newest version of Subclipse and I am not having issues any longer.Personable
My temporary solution is to not install Subclipse and use TortoiseSVN for the time being.Scholasticism
P
25

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

Potboiler answered 23/2, 2015 at 3:49 Comment(4)
In Kepler you can I find it in Team> SVN> Label Decorations menu. 'Perfomance' menu is absent.Stelmach
@Stelmach I've the same problem with Elicpse Oxygen the Performance menu is missingCoriecorilla
there would be two SVN under team or you are not using correct svn pluginLed
This applies to Subversive, if you are missing this page, then you are most likely using Subclipse.Wightman
F
9

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.

Follansbee answered 12/12, 2013 at 19:37 Comment(1)
Simply svn cleanup worked out for me. Just had to run it while in the root project directory. Thanks!Optometry
G
7

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.

Grandniece answered 29/3, 2017 at 5:45 Comment(0)
R
6

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.

Redhanded answered 18/6, 2012 at 15:57 Comment(0)
S
4
  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
Secretion answered 22/9, 2016 at 5:9 Comment(5)
Some explanation of why this should be done or solves the problem would be nice.Disciple
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.Discredit
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.Discredit
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.)Discredit
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.)Discredit
O
3

I faced this problem when having the same project in the workspace twice. Make sure you have only one copy of it in the workspace, maybe it helps.

Outlaw answered 17/6, 2014 at 9:26 Comment(0)
C
2

It could be eclipse memory issue. I had similar problem until I did these steps:

  • Go to Preference -> General and put these values:

Eclipse_Preference_General

This will show your memory usage in eclipse.

  • Then edit your eclipse.ini file and change Xms and Xmx values to these:

-Xms1024m

-Xmx1024m

Look at the memory status. Hope it will help.

Caterina answered 1/7, 2015 at 14:11 Comment(0)
C
2

I was also facing similar issue and I got it resolved this by unchecking "Compute deep outgoing state for folders" under Windows->Preferences->Team->SVN->Label Decorations

Campman answered 13/6, 2017 at 4:15 Comment(0)
J
1

I found an index error in eclipse which blocking the svn. Another project resources and svn repo were in .metadata\.plugins\org.eclipse.core.resources\.projects\ProjectName\4.tree and other resources.

svn cleanup with the previous answer with 'Team > SVN > Performance' doesn't solve my problem.

'eclipse.exe -clean' will make eclipse unresponsible with 100% cpu.

The only solution was after exit eclipse the manual deleting of org.eclipse.core.resources\.projects\* files.

Jaenicke answered 27/11, 2015 at 17:54 Comment(0)
L
1

This topic helped me for solving the problem about my eclipse svn update block.

I am using eclipse mars where this case came.

  1. First I have deleted two projects which I don't needed - to reduce the project number in the workspace.
  2. Changing parameter in eclipse.ini has not helped too.
  3. I had the -clean argument on my eclipse set so I have deleted that too in hope it will work better. It helped a bit so the eclispe was running much longer but not much more. rockfarkas hint here.
  4. What really helped at the end was to mark very fast all projects CtrlA from the project view and close them via the context menu while the SVN cache was still running. The half of them did that the others couldn't but after that I could see that the SVN cache was changing its state and so I could work again. The next step was to close the rest of the projects and open one by one. To this idea I came reading the post of user3096856.
Lunisolar answered 22/4, 2016 at 18:53 Comment(0)
C
1

I solved doing this:

-Select the project (or all projects) on your workspace (in eclipse), right click, select from the menu Team > Cleanup

Canaletto answered 22/2, 2017 at 13:24 Comment(0)
H
0

In my case, for 30 odd minutes it showed just 0 percent completed. I patiently waited since I tried restarting eclipse/machine still was getting the same thing. After 30 minutes, it continued with my svn update operation and completed it successfully.

Patience at times, helps :)

Haematinic answered 28/11, 2013 at 6:11 Comment(0)
N
0

If there is duplicate project from SVN.

  1. Force close eclipse.
  2. Delete the duplicate project from filespace. (Eg: C:\Users\XXX\Workspace\DuplicateProject)
  3. Restarting the eclipse
  4. fixed.
Nugent answered 21/8, 2014 at 17:8 Comment(0)
F
0

I used Subversive - SVN Team Provider 3.0.0 with SVNKit 1.8.10 as SVN Connctor. I updated the SVN Connctor to the latest version 1.8.11,and fixed it.

Ferwerda answered 19/2, 2016 at 6:26 Comment(0)
S
-1

Do you use Maven SCM connector ? Try uninstalling it if you dont need it. SCM connector is required for Maven SCM checkout, I do not use Maven SCM project checkout, instead I use SubEclipse checkout and convert project to maven using import existing project or convert to Maven project option from the context menu in Eclipse.

Squamosal answered 10/1, 2014 at 17:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.