You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by sreidhar kanaparthy <ja...@gmail.com> on 2006/09/07 23:24:00 UTC

memory problem with display table export options

Hi ,

I am using th display table to list the number of users in my application.
Export is working fine when there is less data, but when it reaches more
than 50,000 users , almost all types of
exports throwing the exceptions like heap exception or unable to export .
I am expecting the application to scale to support upto atleast a million
users.


Any suggestion to solve this problem is of great help

Thanks

Re: memory problem with display table export options

Posted by Daniel Dekany <dd...@freemail.hu>.
Monday, September 11, 2006, 11:28:18 AM, Steve O'Hara wrote:

> Correct me if I'm wrong, but Velocity doesn't stream it's output
> until the whole template has been satisfied.

Come on, not even Velocity can be that lame... If that happens, it's
rather that some frameworks chose to buffer the output, because that's
needed for nice error pages, or for implementing page layout stuff.

> Therefore, if you are creating a very large response with a
> template, then it builds the whole response in memory before sending
> it out.  Therefore, it doesn't matter what you set your VM memory
> constraints to, you will always stand a chance of exhausting the memory.
>
> Steve

-- 
Best regards,
 Daniel Dekany


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


RE: memory problem with display table export options

Posted by Steve O'Hara <so...@pivotal-solutions.co.uk>.
Correct me if I'm wrong, but Velocity doesn't stream it's output until the whole template has been satisfied.
Therefore, if you are creating a very large response with a template, then it builds the whole response in memory before sending it out.  Therefore, it doesn't matter what you set your VM memory constraints to, you will always stand a chance of exhausting the memory.

Steve

-----Original Message-----
From: velocity-user-return-18083-sohara=pivotal-solutions.co.uk@jakarta.apache.org [mailto:velocity-user-return-18083-sohara=pivotal-solutions.co.uk@jakarta.apache.org] On Behalf Of Will Glass-Husain
Sent: 10 September 2006 22:54
To: Velocity Users List; java.appfuse@gmail.com
Subject: Re: memory problem with display table export options

Sreidar,

Are you sure you are referring to Velocity?  I'm familiar with the
open source Display Table tag library, but not with anything in
Velocity of that name...

WILL

On 9/8/06, Alexey Panchenko <al...@olmisoft.com> wrote:
> sreidhar kanaparthy wrote:
>
> > I am using th display table to list the number of users in my application.
> > Export is working fine when there is less data, but when it reaches more
> > than 50,000 users , almost all types of
> > exports throwing the exceptions like heap exception or unable to export .
> > I am expecting the application to scale to support upto atleast a million
> > users.
>
> > Any suggestion to solve this problem is of great help
>
> 1. Allow JVM to use more memory - e.g. add "-Xmx256Ì" to the java
> command line starting your application.
>
> 2. Use profiler to track memory usage and optimize it in your
> application.
>
> How do you use velocity? Why do you think that velocity is the most
> involved part in your memory usage?
>
> --
> Best regards,
>  Alexey                            mailto:alex+news@olmisoft.com


-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: memory problem with display table export options

Posted by Will Glass-Husain <wg...@forio.com>.
Sreidar,

Are you sure you are referring to Velocity?  I'm familiar with the
open source Display Table tag library, but not with anything in
Velocity of that name...

WILL

On 9/8/06, Alexey Panchenko <al...@olmisoft.com> wrote:
> sreidhar kanaparthy wrote:
>
> > I am using th display table to list the number of users in my application.
> > Export is working fine when there is less data, but when it reaches more
> > than 50,000 users , almost all types of
> > exports throwing the exceptions like heap exception or unable to export .
> > I am expecting the application to scale to support upto atleast a million
> > users.
>
> > Any suggestion to solve this problem is of great help
>
> 1. Allow JVM to use more memory - e.g. add "-Xmx256Ì" to the java
> command line starting your application.
>
> 2. Use profiler to track memory usage and optimize it in your
> application.
>
> How do you use velocity? Why do you think that velocity is the most
> involved part in your memory usage?
>
> --
> Best regards,
>  Alexey                            mailto:alex+news@olmisoft.com


-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Re: memory problem with display table export options

Posted by Alexey Panchenko <al...@olmisoft.com>.
sreidhar kanaparthy wrote:

> I am using th display table to list the number of users in my application.
> Export is working fine when there is less data, but when it reaches more
> than 50,000 users , almost all types of
> exports throwing the exceptions like heap exception or unable to export .
> I am expecting the application to scale to support upto atleast a million
> users.

> Any suggestion to solve this problem is of great help

1. Allow JVM to use more memory - e.g. add "-Xmx256Ì" to the java
command line starting your application.

2. Use profiler to track memory usage and optimize it in your
application.

How do you use velocity? Why do you think that velocity is the most
involved part in your memory usage?

-- 
Best regards,
 Alexey                            mailto:alex+news@olmisoft.com