This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Using NB 6.0 with GF V2 ur1 b09 To me it looks like there is a memory leak at NB and GF when a web application is run over and over again during development cycles. Today I had to make cosmetically changes to one web project ( only .jsp and .css files where involved ). The WAR is part of an EAR (where some ejbs and a number of entities are included). With the WAR three RichFaces jars and some apache commons jars are deployed to GF. Because I recognized memory consumption by both NB as well as GF up to a point where my notebook (2 GIG memory) becomes nearly inoperable, I jotted down the memory figures from Windows TaskManager today. After 5 times RUN Mainproject (the EAR) NB grew from 205 to 326 Megabytes in chunks of 16 to 24 MB and GF from about 190 to 279 Megabytes in chunks of 6 to 48 MB. If I would continue working with NB this way, it would end up at more than 500 MB for each of the two, as I have seen it when I was working with beta and rc versions of NB already.
Directory deployment was enabled for GF!
Not sure if this is memory leak or just greedy JVM. Did you met any OutOfMemoryError?
No, this time I did not wait until I got Out-Of-Memory but I have got this message when I was using one of the daily builds some weeks ago. Please see my report to Issue #70052, where I have also posted a thread dump.
Is the same as Issue #70052
I did some simple tests and did not see evidence of a significant memory leak in this area. Do GC's (clicking on the memory indicator in the IDE toolbar causes a GC) allow the memory increase to be reclaimed? Do you see this leak in other projects or smaller projects? If you restart the IDE with only this EAR & subprojects loaded, NO open editors, and merely run the EAR over and over, followed by GC's, does it appear there is still a leak? So far there is too little information to go on.
Reduced test environment: a) Windows XP - memory consumption monitored with Task Manager b) Single page Java Server Faces WAR project - not Visual Web created with wizard for JSF 1.2 framework c) One backing bean - instantiating a graph of about five DTO beans d) Twenty JSF tags - labels, input, message e) Using a clean remote registered GF V2 (running on localhos) with a no other applications installed Repeated right-click RUN on the Web Project 50 times: Memory consumption grew from 214 to 269 MB. Continued right-click RUN on the Web Project 50 times: Memory consumption grew from 269 to 345 MB GF Memory consumption stabilized at 241 MB Doing GCs had no impact on memory consumption displayed by Windows Task Manager
Sorry but just after I shut down NetBeans the other Java process - belonging to GF which was remotely registered here continued running - and - IT IS GLASSFISH which grew constantly !!! This was not visible to me in Windows Task Manager so far and first time monitored when GF was started independently because of the remote registration! So this looks like an Issue for the GlassFish Team.
Glassfish V2 UR1 was just released yesterday. Could you redo your tests against that release and see the leak is still present in that version? You can download it here: https://glassfish.dev.java.net/downloads/v2ur1-b09d.html
Repeated my tests with GF v2ur1-b09d. GF stops growing at round about 450 MB memory - looks like it starts GC then. I did not run the prior tests often enough to reach this limit. Maybe I got Out-Of-Memory some weeks ago when NB also reached 500 MB and my 2 GIGs where not enough for this and everything else. This issue can be closed
I don't think GC decisions are made based on available RAM (but I could be wrong). I think there was a memory leak in V2, patched in UR1 that could have been what you were experiencing. If you see further trouble with UR1, feel free to open an issue on glassfish.dev.java.net and we can look at it further.
One more point - to monitor memory usage by NetBeans, you can enable the memory display on the toolbar. Right click the toolbar, select customize and check <Memory>. A toolbar component showing current memory usage will show up. Clicking on it will force a GC.