tomcat response is very slow

L

Lew

ruds said:
I have also kept the session time out as 10 mins if the window is
idle.So [sic] that would handle the object references, is'nt?

Not necessarily. It depends on the lifetime of the references, which can
exceed request lifetime.
 
R

ruds

ruds said:
I have also kept the session time out as 10 mins if the window is
idle.So [sic] that would handle the object references, is'nt?

Not necessarily.  It depends on the lifetime of the references, which can
exceed request lifetime.

How should I handle these object references?
 
L

Lew

ruds said:
I have also kept the session time out as 10 mins if the window is
idle.So [sic] that would handle the object references, is'nt?
Lew said:
Not necessarily. It depends on the lifetime of the references, which can
exceed request lifetime.

Please do not quote sigs.
How should I handle these object references?

Don't keep them around longer than needed. If an object is only needed for
request lifetime, don't store a reference to it in the session or application
context. If an object is only needed for session lifetime, don't store a
reference to it in the application context.

Once all references to an object go away, the object becomes unreachable and
its memory can be reclaimed by the garbage collector.

Java garbage collection (GC) disposes of unreferenced objects automatically as
it feels the need. All one needs to do to get rid of objects is make sure
that no references to them remain. It is a fairly common bug to have hidden
references, e.g., session variables or collection members, that keep objects
alive after the program is actually finished with them. This bug is called
"packratting", or informally, "memory leakage".

More than you wanted to know about Java garbage collection:
<http://java.sun.com/javase/technologies/hotspot/gc/index.jsp>
 
A

Arne Vajhøj

Dave said:
The OP was asking about Tomcat (a servlet only container not EE /
application).

Even a web container only can use a lot of memory.

I would not want to try and run LifeRay with Xmx 64m.

Arne
 
D

Dave Miller

Arne said:
Even a web container only can use a lot of memory.

I would not want to try and run LifeRay with Xmx 64m.

Arne
LifeRay won't start with 64m but it runs (at least for one of our
customers) with 128.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,153
Members
46,699
Latest member
AnneRosen

Latest Threads

Top