Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Tools Suite memory keeps increasing

I have recently started using the Spring Tools Suite (STS 2.7.2), and it seems the memory consumed by the IDE keeps increasing as you continue to work. The usage of the IDE has been pretty limited as of now (no heavy server integration or so...) - just 4-5 Spring projects being worked upon, with a couple of plugins integrated : Maven and Perforce.

As a stat, when the STS workbench was launched, the memory consumption was of the order of ~300MB, but gradually increases to ~800MB.

And then the only option I have is to restart the IDE (after my system obviously goes low on memory).

Is this a known issue? Any workarounds on how to avoid this, or check what may be causing this?

like image 585
Saket Avatar asked Sep 21 '11 16:09

Saket


2 Answers

There are no known memory issues with STS. By default, STS starts with 1024M of heap space. However, this is usually not completely necessary. Typically, STS/Eclipse will use a significant amount of memory on startup as things get initialized (such as Java search indexes, the package explorer, icons, etc.), but this memory usage will level off and decrease over time. Some operations like full builds and Java search will cause temporary spikes in memory usage, but again, memory should go down over time.

You can try running with the Heap status widget active. Go to Preferences -> General -> Show heap status. This will allow you to force garbage collection and you should see your memory usage go down.

If memory continues to increase and you eventually get out of memory errors, then something bad is definitely going on. How much physical memory does your system have?

like image 95
Andrew Eisenberg Avatar answered Sep 28 '22 04:09

Andrew Eisenberg


This is a genuine problem with Spring STS. It keeps increasing the memory it uses and then ultimately crashes without killing the javaw.exe process in the windows process tree.

like image 39
openSource Avatar answered Sep 28 '22 04:09

openSource