Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.3.4
-
Fix Version/s: 1.3.5
-
Component/s: View technologies
-
Labels:None
-
Environment:Linux, Grails 1.3.4, running with JMeter test
-
Testcase included:yes
Description
A memory leak has surfaced while testing a web service that I am writing. I rely heavily on params.id being fused into the url when making requests
e.g. http://localhost:8080/some/action/1234 would yield params.id == 1234
I have found that every single unique request url is being stored in the DefaultUrlMappingsHolder without ever being cleared up. This causes the app to run out of Old Gen space very quickly, and ultimately causes the app to hang completely.
This problem is very easy to replicate. I have attached a small example Grails app, with a JMeter jmx file in the root of the project which will replicate this issue in a short period of time. I've been using jvisualvm to monitor the heap with it's Visual GC perspective.
This is a serious problem for us, as this blocks us from putting this app into production soon.
Looks like replacing the two cache maps with https://code.google.com/p/concurrentlinkedhashmap/ with a max size would achieve a good balance between recomputing lookups and memory usage.