[
https://issues.apache.org/jira/browse/VELOCITY-826?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claude Brisson resolved VELOCITY-826.
-------------------------------------
Resolution: Cannot Reproduce
Assignee: Claude Brisson
Fix Version/s: 2.x
I don't know if a specific change in the trunk fixed it, but I profiled your
test case with jvisualvm and did not find any memory leak. The attached graph
shows memory consumption for 5 million iterations, exhibiting peaks in each
automatically triggered garbage collection.
Tested with jdk 1.7.0_51.
Maybe running under very low VM heap settings do need some special garbage
collection strategy, but it's outside the scope of Velocity.
> OutOfMemoryError using #parse and resource.loader.cache off
> -----------------------------------------------------------
>
> Key: VELOCITY-826
> URL: https://issues.apache.org/jira/browse/VELOCITY-826
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.7
> Environment: Windows, Java 1.6, low heap (-Xmx10m)
> Reporter: Marnix Bindels
> Assignee: Claude Brisson
> Priority: Minor
> Fix For: 2.x
>
> Attachments: VelocityOutOfMemoryTest.java, heap.png, script_1.vm,
> script_2.vm, script_3.vm
>
>
> I was testing a template collection that uses #parse inside some #foreach,
> which worked all fine inside eclipse but crashed when used in the stand-alone
> application running with a low heap setting with an OutOfMemoryError: Java
> heap space. I was able overcome this by setting the
> <loader>.resource.loader.cache to "true".
> Still I wanted to let you know about this as it may be an indicator of a
> resource management issue of sorts anyway. The parsed resource is constant,
> with caching off it gets reported as found and loaded by the ResourceManager
> for each iteration (some 6000 times in the example). I understand that
> without caching it gets loaded every time, but why do the previously loaded
> instances keep occupying memory?
> When published on teh dev mailing list, it was suggested to file this bug
> report.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]