check your TR.properties file.make sure the module.cache = true. Maybe u l 
solve the problem!


----- Original Message ----- 
From: "AFrieze" <[EMAIL PROTECTED]>
To: "Turbine Users List" <[email protected]>
Sent: Friday, December 22, 2006 1:39 AM
Subject: Re: java.lang.OutOfMemoryError


> jill han wrote:
> > The exception only happened to the clients that have more results
> > returned, but the results are no more than 40.
> > For the other clients, the same page will run fine.
> > The exception will go away after the tomcat server is restarted.
> > For querying a db, I just used:
> > Criteria crit = new Criteria();
> > Crit.add(..)
> > listObject = ClassPeer.doSelect(crit);
> > for update , I used intake like:
> > Group group = IntakeHelper.getIntakeGroup(context, INTAKE_GROUP);
> > group.setProperties(classobject);
> > classobject.save();
> > since I do not use 
> > Connection con = ....
> > There is no such 
> > Con.close() statement in the code
> >
> > Do you think I should have 
> > Connection con = ..... statement whenever I query a db?
> >
> > Thanks for your helps.
> >
> > -----Original Message-----
> > From: Tony Oslund [mailto:[EMAIL PROTECTED] 
> > Sent: Wednesday, December 20, 2006 9:44 AM
> > To: Turbine Users List
> > Subject: RE: java.lang.OutOfMemoryError
> >
> > I am not sure if you have found the source of the memory problem, but
> > here are a few thoughts, since it appears that it might be database
> > related.
> >
> > Are there any conditions under which you are not releasing one or more
> > database connections?  Is it possible that a "CallableStatement" or a
> > "ResultSet" is not being closed.
> >
> > When I have done this myself, it can be easily overlooked and can cause
> > some very strange appearing bugs including out of memory errors.
> >  
> > It is a little tough shooting in the dark... One obvious thing that
> > might help pinpoint the problem is to know if it happens the first time
> > the code is executed (say right after a fresh restart with a single
> > user), or if the problem occurs only after the code is executed
> > repeatedly, by the same user, multiple users, etc.
> >
> > If you have found the source of the problem, it would be interesting to
> > hear about it.
> >
> > Best of luck.
> >
> > -----Original Message-----
> > From: jill han [mailto:[EMAIL PROTECTED] 
> > Sent: Tuesday, December 19, 2006 8:15 AM
> > To: Turbine Users List
> > Subject: RE: java.lang.OutOfMemoryError
> >
> > Yes, I am querying a database, but not with large amounts of data.
> > Such exception will go away after I restart the tomcat server.
> >
> > -----Original Message-----
> > From: AFrieze [mailto:[EMAIL PROTECTED] 
> > Sent: Monday, December 18, 2006 5:11 PM
> > To: Turbine Users List
> > Subject: Re: java.lang.OutOfMemoryError
> >
> > jill han wrote:
> >   
> >> What could cause java.lang.OutOfMemoryError ?
> >> The application is built on turbine/torque/velocity.
> >>
> >> Thanks in advance
> >>
> >> Jill
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
> >> For additional commands, e-mail: [EMAIL PROTECTED]
> >>
> >>
> >>   
> >>     
> > Jill
> >
> > I have encountered this problem in several different situations. Are you
> >
> > querying a database and/or dealing with large amounts of XML data?
> > If the problem is space related, you should probably increase the amount
> >
> > of memory java can use.
> >
> > Example) If you are using linux as your O/S and tomcat as your server, 
> > you could add this line to your Catalina.sh file.
> >
> > export JAVA_OPTS=${JAVA_OPTS}'-Xmx512m -Xms128m'
> >
> > Hope this helps
> > AFrieze
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >   
> Jill
> 
> There are a couple of things I think we should try.
> 
> Determine exactly where your program is crashing using try/catch blocks 
> and print the trace.
> try{
> // .....Code you execute....
> }
> catch(Exception e){
> //your logging system?
> //print trace, identify the exact line where the problem is
> }
> After you determine the line that is causing the problem, show us the 
> surrounding code, a description of what the code does, and the line of 
> code which crashes.
> 
> *Next*,
> Go into your TurbineResources.properties file and look for any tools 
> that are global. I am wondering if any accumulating data is getting 
> stored across multiple sessions. If there are any tools marked global, 
> show them to us and let us know what you do with them. Look for any 
> session tools which might accumulate data as well.
> *
> Next,*
> Run a network monitor tool every 30 minutes or so, like netstat if you 
> are using linux(the command netsat -vat). Run this tool on both your 
> server and your database machine at the same time and compare. Compare 
> these when the machines are running smoothly and when they are crashing. 
> This will help you determine if there are unclosed connections. Turbine 
> maintains a pool of connections(defaults to 30 max with 4 always open i 
> think). Unclosed connections generally cause a hanging system or 
> file-descriptor errors, but it is worth checking.
> 
> 
> Hope this helps
> AFrieze
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Reply via email to