Local VCS OUT OF CONTROL!!!
My VCS/vault directory is blowing up to over 60 GB! Of course at that point I have to kill off Idea - the only way I can run Idea is with Local VCS disabled.
I'm new to the VCS behind Idea, so I'm hoping someone can give me some advice here. What are the consequences of disabling VCS? How can I control it? It seems like culprit of this memory explosion is a certain log file that no longer exists under my project (The bigger directories under in my vault directory contain dozens of copies of this log file at ~150 MB each). I deleted the bigger directories under my vault dir, but they are regenerated just the same.
Thanks in advance to anyone that can help.
Please sign in to leave a comment.
Hi,
Those log files are somewhere in your IDEA project, please, remove or
exclude them.
Local vcs could not disabled completely, it is needed for proper IDEA work.
doug huttegger wrote:
--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"
Thanks for the response.
I already found the log file and moved it, but when I re-enable the Local VCS on Idea, it still regenerates it in the vault directory several times. The directory where I found the file is not one that I want to completely exclude either.
Also, even more confusing is that this log was created 2 months ago and just caused issues recently.
Any thoughts?
Thank you.
Note, excluding the directory in which the file originally existed (under project properties / paths) doesnt help either. I've searched my project and there are no log files close to that size. Do I need to completely delete the vault directory for this project? What are the consequences of doing that?
Correction. Excluding the directory that did contain the problem file does fix things (ie. allows me to enable Local VCS). HOWEVER, I need other files/directories that are under this directory AND that problem file no longer exists (not to mention, again, this was an older file that never created issues before).
Thanks for your patience and attention. Any further advice/insight into Idea's VCS would be greatly appreciated - I cant seem to find much on what, why, and from where the VCS/vault & repository directories are being generated, etc.
Scratch that.
I was able to re-enable Local VCS, but when I restarted the project and it came time for synchronization - same thing again.
I'm really stuck here.
Doug wrote:
> It is a runtime generated log file that I found and deleted, but it
is still being regenerated by Idea in my vcs/vault directory.
Perhaps it is constantly getting regenerated by the project, and then
deleted? Then IDEA would make many copies of it, potentially.
If not, then you could also try either 1) Shutting down IDEA, deleting
all the system caches (basically all the folders in the IntelliJ IDEA
system folder except plugins) and restarting, or 2) if you don't want to
delete all the caches, you could try setting VCS to 1 or 2 or 3 days,
waiting for the log file to expire, then setting VCS back to however
many days you have it set to.
As a last resort, you could try adding an entry to the 'Ignore files and
folders' setting in Settings > General. This way you can potentially
exclude a single file.
--
Rob Harwood
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"
>Perhaps it is constantly getting regenerated by the project, and then
>deleted? Then IDEA would make many copies of it, potentially.
The file is generated by JBoss, so I dont think that is the issue.
Unfortunately, I dont see any other option than to delete my caches (do you mean all folders under /.IntelliJIdea/system/ - not just the vcs directory??) since now I cant even re-enable the Local VCS by excluding directories like I was able to do before restarting Idea.
Also, when the issue re-occurred during synchronization (like I mentioned above after being able to re-enable VCS) it seemed to be stuck at a different point than before (before it kind of locked up at the directory where that large log file once existed). Not sure what to think.
Thanks again for all the help. I'm a big fan of Idea and all the speedy responses here are encouraging. I'll keep at it.
Doug wrote:
Hehe, I've had similar problems with JBoss logs in the past (except mine
was doing text searches). I would suggest to exclude the file in some
way, either directory exclude, file ignore, or reconfigure JBoss to put
the log outside of your project structure.
--
Rob Harwood
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"
Can you tell me what will be the effects of deleting my cache? (and do you mean all files under /.IntelliJIdea/system/ OR just those under /.IntelliJIdea/system/vcs/<project> ???)
Also, I have set my JBoss log directories to be excluded, but this hasn't helped (nor have I attempted to run JBoss since these issues came up). However, I'll keep your other suggestions in mind.
Doug wrote:
The system folder is automatically generated by IDEA and contains mostly
'temporary' stuff. You can delete the entire thing (while IDEA is not
running) and IDEA will start fine, recreating a new system folder when
restarted. I seem to recall (I could be mistaken) losing some minor
settings when I deleted the system/plugins folder, so I would suggest
not deleting that one folder. Everything else is fine.
What you will lose, primarily, will be your Local History cache. This
means you won't be able to look in the Local History past the date you
deleted the system folder. But if you use some version control system
like CVS or whatever, then this shouldn't be a problem. Once IDEA is
restarted, it will recreate the Local History cache, starting at the
date you start IDEA.
--
Rob Harwood
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"
Thank you again for all your help.
After deleting the system directories, I was able to re-enable VCS without any problems. (I guess I should have taken that leap in the first place, but I wanted to be cautious)
One last question: Is there any ill effect of setting local history to keep for 0 days (keeping in mind that I use starTeam for version control and have never explicitly looked at local history through Idea)?
Doug wrote:
Hi Doug,
If you don't want to use Local History, you can turn it off completely
with a checkbox in Settings > Local History. However, I would instead
suggest that you become familiar with it. It is really a very useful
feature. There have been many occasions where it saved me time and
headaches, even considering that I was using source control at the time.
See, the thing about Local History is that it automatically tracks
changes everytime you save your files, which occurs whenever you switch
to another program, or when you compile/run your project, or do a
refactoring, and in several other occasions. So it has a much finer
granularity than your team's source-control system, which you only
update when you check in files. Consider the Local History as your
super-duper-mega Undo/Redo Get-out-of-jail-free card. Even the ability
to use smart-diff on recent changes you've made is enough reason to keep
it active.
The real problem you were encountering was the enormous JBoss log file.
It is best to keep such 'temp' files, including generated files,
build-generated files, binaries, etc. out of IDEA's 'domain'. The thing
to keep inside IDEA's domain is your source and configuration files.
There are several ways to include/exclude files and folders from your
project. The best thing is to play around with the different options,
then come up with a good project structure and do it that way. Read
through the help system to get more familiar with the options.
Benefits of keeping your IDEA project 'minimal': Searches are faster,
including usage searches and refactorings; start-up time is faster; less
synchronization needed when switching back to IDEA; disk space is
reduced (as you've experienced); your code-completion and Go to File
lists are shorter and have less duplicates; etc. etc.
So, with that in mind, I would suggest first to re-configure your
project/modules to be as minimal as possible (that includes module
'content roots', as well as which jars are included in your modules'
'libraries'). This will have many effects to make IDEA as snappy as
possible. Then, I would set the Local History to at least 3 days, to
handle weekends. Honestly, I usually run Local History with 30 days, and
have no problems because I keep big files and often-generated files out
of IDEA's configuration.
--
Rob Harwood
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"
Rob Harwood (JetBrains) wrote:
I think I should be more clear about that. A good rule of thumb is "Do I
want this file/folder to be searched when I do a project-wide
search-and-replace?" Another good rule of thumb is, "Do I want to be
able to open (Ctrl-Shift-N) and edit the file in IDEA?"
So, you'll probably want your HTML files, text files, even your webapp
server configuration files like a Tomcat server.xml. But you won't want
Tomcat's cache, or anything like that, so you exclude those folders. (I
actually like to have Tomcat's log file available in IDEA, but JBoss' is
just too huge.)
Also, it doesn't have to be an all-or-nothing, set-in-stone thing. You
can modify the project paths and exclusions as you work, e.g. if you
realize you want to access some folder, just add a content root or
remove the exclusion.
--
Rob Harwood
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"
I'd like to ask a question here.
I'm using 4.5, and found that Disabling Local History seems ONLY hide the menu of it. As soon as I enable it, I can find the changing history all the same.
But , I really love it, 'cause it saved me from some "disaster". I just want to know how could this be?
Even if local history is disabled we still store single version of each file.
We just need this for technical reasons.
-
Maxim Shafirov
http://www.jetbrains.com
"Develop with pleasure!"
warbaby wrote:
Hmm. I'm not sure. That could be a bug. It doesn't sound right to me. If
you can reproduce it, and it seems wrong to you, submit it to the "IDEA
Feedback (IDEA)" project in Jira: http://jeybrains.net/jira/
--
Rob Harwood
Software Developer
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"
Maxim Shafirov (JetBrains) 's answer solved my confusion :)
Yes, he's right, I'm right too:)
The "changing history" i mentioned is the changing of Directory , not of a single file.
With "LOCAL HISTORY" disabled, you create new files, delete some files, and then you enable "LH" and show the directory's LH. You will see the actions that you create or delete. And also you can recover the deleted files. Now I know that why IDEA can "undo delete files" huh. The "disaster" i mentioned is actually "Deleted Recovery".
Thanks for your help!