You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Claudia Woestheinrich <cl...@vit.de> on 2003/12/09 12:58:41 UTC

java.lang.OutOfMemoryError

Hallo,

I get a List with Torque from my Database. Now I whish to write the
datas. I need Velocity as Template and
write the List with #foreach ($zeile in $list).  But when the List
is very big (5000 rows) I became a
                                                                     
 java.lang.OutOfMemoryError.                                         
                                                                     
 What can I do?                                                      
                                                                     
 Thanks                                                              
 Claudia                                                             
                                                                     




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


Re: java.lang.OutOfMemoryError

Posted by Scott Eade <se...@backstagetech.com.au>.
Claudia Woestheinrich wrote:

>I get a List with Torque from my Database. Now I whish to write the
>datas. I need Velocity as Template and
>write the List with #foreach ($zeile in $list).  But when the List
>is very big (5000 rows) I became a
>                                                                     
> java.lang.OutOfMemoryError.                                         
>                                                                     
> What can I do?                                                      
>  
>
Select fewer rows from the database (is your user really going to look 
at all 5000 rows?)

You can also look at using LargeSelect to page through the data, but I 
would still look at reducing the number of rows returned first.

Another option is to allocate more memory to the jvm that runs your 
webapp :-)

Scott

-- 
Scott Eade
Backstage Technologies Pty. Ltd.
http://www.backstagetech.com.au





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


Re: java.lang.OutOfMemoryError

Posted by Jeff Painter <pa...@kiasoft.com>.
On Tue, 9 Dec 2003, Claudia Woestheinrich wrote:

> Hallo,
> 
> I get a List with Torque from my Database. Now I whish to write the
> datas. I need Velocity as Template and
> write the List with #foreach ($zeile in $list).  But when the List
> is very big (5000 rows) I became a
>                                                                      
>  java.lang.OutOfMemoryError.                                         
>                                                                      
>  What can I do?                                                      
>                                                                      
>  Thanks                                                              
>  Claudia                                                             
>                                                                      

I have some reports that run this long and use velocity to munge the data 
into text files for downloading.

You may want to look at adjusting the memory settings in your tomcat's
catalina.sh with the following option line 
 
 CATALINA_OPTS="-Xms64m -Xmx92m -Djava.awt.headless=true"

You can set the min amount of memory for the jvm to startup with and the 
max that it should use. If you are displaying this to the user though I 
would go with Scott's suggestion about LargeSelect or limiting the select 
so it does not return so much data at once 

-- 
Regards,

Jeffery Painter

- --
painter@kiasoft.com                     http://kiasoft.com
PGP FP: 9CE8 83A2 33FA 32B1 0AB1  4E62 E4CB E4DA 5913 EFBC

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
 
iD8DBQE/qEQE5Mvk2lkT77wRAnMJAJ9vJ6qOkg/mvqqIpz7troCEQJ8bFACglu/U
YNXabx7DZOV2Hd9LwSTmGpY=
=dWiu
-----END PGP SIGNATURE-----


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