Yes my experience with the singleton memory leak was with Tomcat,
when it was auto reloading the application when class files changed.
regards Malcolm Edgar
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands,
: Re: OutOfMemoryException Processing Velocity Template
If your are reloading your application a lot, i.e. doing development work,
the singleton pattern causes a memory leak. This could be expressed in OOME
when rendering templates.
regards Malcolm Edgar
On 2/7/06, Nathan Bubna [EMAIL PROTECTED
Edgar [mailto:[EMAIL PROTECTED]
Sent: Monday, February 06, 2006 8:35 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
If your are reloading your application a lot, i.e. doing development work,
the singleton pattern causes a memory leak. This could
PROTECTED]
To: Velocity Users List velocity-user@jakarta.apache.org
Sent: Tuesday, February 07, 2006 1:33 PM
Subject: RE: OutOfMemoryException Processing Velocity Template
And here all the time I thought it was a Tomcat issue with reloading.
All of my web applications use the VelocityEngine rather
: Saturday, February 04, 2006 4:35 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
Are you using Velocity singleton pattern or VelocityEngine?
regards Malcolm Edgar
On 2/4/06, e v a n [EMAIL PROTECTED] wrote:
Hello,
I just picked up on this thread[1
: OutOfMemoryException Processing Velocity Template
Are you using Velocity singleton pattern or VelocityEngine?
regards Malcolm Edgar
On 2/4/06, e v a n [EMAIL PROTECTED] wrote:
Hello,
I just picked up on this thread[1] from 5-10-2005 today because I'm
running into a similar issue
Subject: Re: OutOfMemoryException Processing Velocity Template
that depends on which version of VelocityTools you are using. in 1.2, we
rewrote things to use a VelocityEngine instead of the singleton, which was
causing problems for us.
On 2/6/06, e v a n [EMAIL PROTECTED] wrote:
I believe that I'm
: Nathan Bubna [mailto:[EMAIL PROTECTED]
Sent: Monday, February 06, 2006 1:11 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
that depends on which version of VelocityTools you are using. in 1.2, we
rewrote things to use a VelocityEngine instead
PROTECTED]
Sent: Monday, February 06, 2006 1:11 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
that depends on which version of VelocityTools you are using. in 1.2, we
rewrote things to use a VelocityEngine instead of the singleton, which
need to be written
out with Velocity. To anyone's knowledge, has anyone come up with such a
patch?
Thank You,
Evan Leonard
[1] -
http://www.nabble.com/RE%3A-OutOfMemoryException-Processing-Velocity-Templat
e-t5193.html
[2] -
http://www.nabble.com/Re:-OutOfMemoryException-Processing-Velocity
-OutOfMemoryException-Processing-Velocity-Templat
e-t5193.html
[2] -
http://www.nabble.com/Re:-OutOfMemoryException-Processing-Velocity-Template-
p23480.html
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands
to think of a use case where a user wants to scroll down 66K rows.
WILL
- Original Message -
From: Mike Curwen [EMAIL PROTECTED]
To: 'Velocity Users List' velocity-user@jakarta.apache.org
Sent: Tuesday, May 10, 2005 5:09 PM
Subject: RE: OutOfMemoryException Processing Velocity Template
.
WILL
- Original Message -
From: Mike Curwen [EMAIL PROTECTED]
To: 'Velocity Users List' velocity-user@jakarta.apache.org
Sent: Tuesday, May 10, 2005 5:09 PM
Subject: RE: OutOfMemoryException Processing Velocity Template
From way back in your first email:
unless I set the tomcat JVM
Hey there,
we also have a webapp with reports with lots of rows.
We used to use a homegrown template parser, and recently switched to
velocity for standards and tools, and on the whole i've been quite happy
minus a few little issues, most which where solvable with the right
convience classes.
Hey we've been using macro's to workaround complex setting issues.
The problem is that if we use the global defaults, we can't overwrite the
marco's and the concept of using them as a variable is lost, and if we turn
it on
props.put(velocimacro.context.localscope, + true);
then the parsed file
PROTECTED]
To: Velocity Users List velocity-user@jakarta.apache.org
Sent: Wednesday, May 11, 2005 1:32 PM
Subject: Re: OutOfMemoryException Processing Velocity Template
Hey we've been using macro's to workaround complex setting issues.
The problem is that if we use the global defaults, we can't overwrite
PROTECTED]
Sent: Friday, May 06, 2005 1:48 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
I printed out the available memory before and after I call
mergeTemplate:
Free memory before merge: 217393352
Free memory after merge: 16271392
so I would assume
-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, May 06, 2005 1:48 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
I printed out the available memory before and after I call
mergeTemplate:
Free memory before merge: 217393352
Free
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, May 06, 2005 1:48 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
I printed out the available memory before and after I call
mergeTemplate:
Free memory before merge: 217393352
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
I printed out the available memory before and after I call
mergeTemplate:
Free memory before merge: 217393352
Free memory after merge: 16271392
so I would assume the StringWriter
a FileWriter.
David
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, May 06, 2005 1:48 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
I printed out the available memory before and after I
: Re: OutOfMemoryException Processing Velocity Template
I printed out the available memory before and after I call
mergeTemplate:
Free memory before merge: 217393352
Free memory after merge: 16271392
so I would assume the StringWriter is approximately 200MB after
PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, May 06, 2005 1:48 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
I printed out the available memory before and after I call
mergeTemplate:
Free memory before merge
:[EMAIL PROTECTED]
Sent: Friday, May 06, 2005 1:48 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity
Template
I printed out the available memory before and after I call
mergeTemplate:
Free memory
]
Sent: Friday, May 06, 2005 1:48 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity
Template
I printed out the available memory before and after I
call
mergeTemplate:
Free memory
, but
certainly for me and any apps I've ever written.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, May 10, 2005 6:21 PM
To: Nathan Bubna
Cc: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
*Gasp* Ok so I
of a use case where a user wants to scroll down 66K rows.
WILL
- Original Message -
From: Mike Curwen [EMAIL PROTECTED]
To: 'Velocity Users List' velocity-user@jakarta.apache.org
Sent: Tuesday, May 10, 2005 5:09 PM
Subject: RE: OutOfMemoryException Processing Velocity Template
From way back
] [mailto:[EMAIL PROTECTED]
Sent: Friday, May 06, 2005 1:48 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
I printed out the available memory before and after I call
mergeTemplate:
Free memory before merge: 217393352
Free memory after merge
List
Subject: Re: OutOfMemoryException Processing Velocity Template
I printed out the available memory before and after I call
mergeTemplate:
Free memory before merge: 217393352
Free memory after merge: 16271392
so I would assume the StringWriter is approximately 200MB after the
merge. What should
Well, I don't have a good clue now.
What about do the debugging step by step, i.e., use just static html
in your #foreach loop? Will that blow up the memory?
Cheers,
Jian
On 5/5/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Thanks for the suggestion. I tried putting that, along with
I tried putting static HTML in the #foreach loop, same problem. Then I tried
setting the large list as a local varible:
#set ($localList = $List)
#foreach($row in $localList)
...
but that didnt help either. I don't see why velocity should use 250+ MB of
memory iterating over a list ~8MB in
Ok, I think I've located the problem, although I can't think of a reasonable
solution.
Basically, if I make the #foreach loop EMPTY, it uses barely any memory:
#foreach($row in $List)
#end
As I add more to the body of the #foreach:
#foreach($row in $List)
tr
/tr
#end
The amount of memory
What kind of writer are you using and how long are the items? 66 000 HTML table
rows with 5 numeric columns consumes about 32 MB when buffered into a string
writer. If the items are longer, it takes much more memory.
-- Ilkka
[EMAIL PROTECTED] wrote:
I tried putting static HTML in the #foreach
Sorry, I'm not sure what you mean by what kind of writer I'm using. Where
would I find out? How would I change this (to maybe a StringBuffer writer?)
Also, each column contains a String that is at most, 200 characters, most are
closer to 10-20. There are a total of 10 columns.
Thanks.
Hi,
I guess the writer Ilkka talked about is when using Velocity as a
standalone template engine.
Right now I don't have a good clue, could you run Velocity as a
standalone template engine and render the page to see if there is a
huge memory usage?
Cheers,
Jian
On 5/6/05, [EMAIL PROTECTED]
Alright, I ran this little piece of code:
public static void main( String args[] ) throws Exception
{
/* first, we init the runtime engine. Defaults are fine. */
Velocity.init();
/* lets make a Context and put data into it */
VelocityContext context = new
Why do you use StringWriter? That is cached in the memory.
How big is the StringWriter after the merge?
David
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, May 06, 2005 1:22 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing
: Re: OutOfMemoryException Processing Velocity Template
Alright, I ran this little piece of code:
public static void main( String args[] ) throws Exception
{
/* first, we init the runtime engine. Defaults are fine. */
Velocity.init();
/* lets make a Context
Well, Open a file, use a FileWriter.
David
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Friday, May 06, 2005 1:48 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
I printed out the available memory before and after
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
I printed out the available memory before and after I call
mergeTemplate:
Free memory before merge: 217393352
Free memory after merge: 16271392
so I would assume the StringWriter is approximately 200MB
1.4.2_04-b05).
WILL
- Original Message -
From: [EMAIL PROTECTED]
To: Velocity Users List velocity-user@jakarta.apache.org
Sent: Friday, May 06, 2005 2:08 PM
Subject: Re: OutOfMemoryException Processing Velocity Template
Ok now I'm confused (suprise, suprise!). I looked
might also check out Hyades from the Eclipse project for an open source
option.
WILL
- Original Message -
From: [EMAIL PROTECTED]
To: Velocity Users List velocity-user@jakarta.apache.org
Sent: Friday, May 06, 2005 2:39 PM
Subject: Re: OutOfMemoryException Processing Velocity Template
the Eclipse project for an open source
option.
WILL
- Original Message -
From: [EMAIL PROTECTED]
To: Velocity Users List velocity-user@jakarta.apache.org
Sent: Friday, May 06, 2005 2:39 PM
Subject: Re: OutOfMemoryException Processing Velocity Template
This is why I'm so
: Friday, May 06, 2005 3:45 PM
Subject: Re: OutOfMemoryException Processing Velocity Template
Ok I tried using JProfiler and used a StringWriter, and found that the
item that was taking the most memory (150 MB) was. char[]! Ok now I'm
completely stumped and clueless.
-L
On Fri, May 06, 2005 at 02:51
PROTECTED]
Sent: Friday, May 06, 2005 3:46 PM
To: Velocity Users List
Subject: Re: OutOfMemoryException Processing Velocity Template
Ok I tried using JProfiler and used a StringWriter, and found that the
item that was taking the most memory (150 MB) was. char[]! Ok now
I'm completely stumped
Hi,
This maybe because you haven't turned on template caching. I had
similar problem before, and even if I only used evaluate(...) method
and load the template using my own java program, it happened when the
for loop is lot of iterations.
The bottom line for my problem is I need to turn on
46 matches
Mail list logo