You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by markx3 <ma...@qwest.net> on 2007/01/02 21:51:17 UTC

Tomcat cache problem?

Hello, 

I have a server running Windows 2003 server SP1.  8 GB of RAM.  Sun Java
J2SE 5.0 update 7 and Tomcat 5.5.20. 

Tomcat is used as our web server to review archived email.  The email is
stored in folders on the server and the archival system uses MS SQL 2000 SP4
on the backend. 

The problem is when we use Tomcat as our web server to review the email, and
we click on several emails, after awhile regardless of the different email
we click on, we get the same data displayed in our web browser.  This really
appears to be a caching issue with Tomcat, because every time we restart the
tomcat service, the problem goes away for a few days and then it happens
again.   

To try to fix the issue we gave Tomcat more memory in the Tomcat Properties
/ Java tab.  We set initial memory pool to 128 MB of RAM and maximum memory
pool to 512 MB of RAM.  We also tried setting the IE 6.0 and 7.0 browsers to
check for newer versions of the page every time I visit the webpage.  Both
of these attempts didn’t resolve the issue. 

Since I’m not a web developer I don’t know what to tell you about the
website tomcat is hosting.  Except for that it was a .war file that tomcat
extracts once we place in into the tomcat5.5\webapps directory.  If you need
specifics on what this website is, please let me know and I can get that
info for you.  But looking through it there are all the usual files like
.jsp, .htm, etc. 

Also there isn’t a proxy server on the network.  When users connect to the
website tomcat is hosting, the browser on the local machine is making a
direct connection since it’s on the same subnet. 

Please let me know what suggestions we can use to try to resolve this issue. 

-- 
View this message in context: http://www.nabble.com/Tomcat-cache-problem--tf2909995.html#a8130484
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat cache problem?

Posted by markx3 <ma...@qwest.net>.
Hello,

We tried reloading the website in the managers section and we were still
able to duplicate the issue without restarting Tomcat.  So do we think this
is an issue with the webpage itself?


david.delbecq wrote:
> 
> To make it short, tomcat does no caching of servlet / jsp output. Your
> webapp is at fault
> 
> 
> All tomcat does is handle the 'if-modified-since' header when serving
> static data (what is not served by a servlet or a jsp, mainly pictures,
> static html, css). The fact it goes back well when you restart tomcat
> points out it's a problem with you specific web application. As you have
> no knowledge of what is inside this web application, i suggest you check
> with the vendor and or developpers of that specific web application.
> 
> 
> If you want confirmation, just restart your webapplication without
> restarting tomcat (use the manager or lambda probe for that)
> 
> reference:
> 
> tomcat manager http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html
> lambda probe http://www.lambdaprobe.org
> 
> markx3 a écrit :
>> Hello, 
>>
>> I have a server running Windows 2003 server SP1.  8 GB of RAM.  Sun Java
>> J2SE 5.0 update 7 and Tomcat 5.5.20. 
>>
>> Tomcat is used as our web server to review archived email.  The email is
>> stored in folders on the server and the archival system uses MS SQL 2000
>> SP4
>> on the backend. 
>>
>> The problem is when we use Tomcat as our web server to review the email,
>> and
>> we click on several emails, after awhile regardless of the different
>> email
>> we click on, we get the same data displayed in our web browser.  This
>> really
>> appears to be a caching issue with Tomcat, because every time we restart
>> the
>> tomcat service, the problem goes away for a few days and then it happens
>> again.   
>>
>> To try to fix the issue we gave Tomcat more memory in the Tomcat
>> Properties
>> / Java tab.  We set initial memory pool to 128 MB of RAM and maximum
>> memory
>> pool to 512 MB of RAM.  We also tried setting the IE 6.0 and 7.0 browsers
>> to
>> check for newer versions of the page every time I visit the webpage. 
>> Both
>> of these attempts didn’t resolve the issue. 
>>
>> Since I’m not a web developer I don’t know what to tell you about the
>> website tomcat is hosting.  Except for that it was a .war file that
>> tomcat
>> extracts once we place in into the tomcat5.5\webapps directory.  If you
>> need
>> specifics on what this website is, please let me know and I can get that
>> info for you.  But looking through it there are all the usual files like
>> .jsp, .htm, etc. 
>>
>> Also there isn’t a proxy server on the network.  When users connect to
>> the
>> website tomcat is hosting, the browser on the local machine is making a
>> direct connection since it’s on the same subnet. 
>>
>> Please let me know what suggestions we can use to try to resolve this
>> issue. 
>>
>>   
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-cache-problem--tf2909995.html#a8168104
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat cache problem?

Posted by Per Johnsson <Pe...@omxgroup.com>.
Hi!

I just want to enlight you about FireBug which is a FireFox plugin which
has a lot of stuff, including webserver communication:

http://www.getfirebug.com/

It's a beta but its very promising and nice.

Another good way to se if a page is cached during debugging is a sysout
to the logfile, that way you really se if the jsp/servlet is executed.

/Per Jonsson
 

-----Original Message-----
From: Leon Rosenberg [mailto:rosenberg.leon@googlemail.com] 
Sent: den 5 januari 2007 01:01
To: Tomcat Users List
Subject: Re: Tomcat cache problem?

the caching behaviour of the modern browsers is really a rocket science.
One of the way to try to control it is to put the according meta-tags
into your files:

		<META http-equiv="pragma" content="no-cache">
		<META http-equiv="Cache-Control" content="no-cache,
must-revalidate">
		<META name="Expires" content="0">

Furthermore I'd suggest you add a unique timestemp
(System.currentTimeMillis()) to each link (and change it on each page
reload). This way you can force the browser to believe he hasn't visited
the page yet.

That been said, you should really look into using a program which
displays browser-webserver communication. For firefox its
LiveHttpHeaders or TamperData , for IE a version of  LiveIEHttpHeaders
exists somewhere on the net.

When you see that your browser sends a valid new request and the servers
sends old data back you should start to check your webapp :-)

regards
Leon

********************************************************************************
This e-mail and the information it contains may be privileged and/or
confidential.  It is for the intended addressee(s) only.
The unauthorised use, disclosure or copying of this e-mail, or any information it contains, is prohibited. 
If you are not an intended recipient, please contact the sender and delete the material from your computer.
********************************************************************************



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat cache problem?

Posted by Leon Rosenberg <ro...@googlemail.com>.
the caching behaviour of the modern browsers is really a rocket
science. One of the way to try to control it is to put the according
meta-tags into your files:

		<META http-equiv="pragma" content="no-cache">
		<META http-equiv="Cache-Control" content="no-cache, must-revalidate">
		<META name="Expires" content="0">

Furthermore I'd suggest you add a unique timestemp
(System.currentTimeMillis()) to each link (and change it on each page
reload). This way you can force the browser to believe he hasn't
visited the page yet.

That been said, you should really look into using a program which
displays browser-webserver communication. For firefox its
LiveHttpHeaders or TamperData , for IE a version of  LiveIEHttpHeaders
exists somewhere on the net.

When you see that your browser sends a valid new request and the
servers sends old data back you should start to check your webapp :-)

regards
Leon


On 1/4/07, markx3 <ma...@qwest.net> wrote:
>
> Hello,
>
> What do you mean by "and you probably should check the pragmas in the pages
> (expire,
> no-cache, etc). If they aren't present - you are screwed :-)"
>
> Can you please give me more info on what to do?
>
> Thank you!
>
> Leon Rosenberg-3 wrote:
> >
> > and you probably should check the pragmas in the pages (expire,
> > no-cache, etc). If they aren't present - you are screwed :-)
> >
> > alternatively you could try to set your browser to get the page
> > explicitely each time you request it (works with ie, firefox is dumb
> > enough to ignore it, thinking it knows more about the actuallity of
> > the page than you).
> >
> > Have you actually check with TamperData or LiveHttpHeaders if the
> > browser really sends GET requests upon refresh?
> >
> > Leon
> >
> > On 1/3/07, david.delbecq <da...@oma.be> wrote:
> >> To make it short, tomcat does no caching of servlet / jsp output. Your
> >> webapp is at fault
> >>
> >>
> >> All tomcat does is handle the 'if-modified-since' header when serving
> >> static data (what is not served by a servlet or a jsp, mainly pictures,
> >> static html, css). The fact it goes back well when you restart tomcat
> >> points out it's a problem with you specific web application. As you have
> >> no knowledge of what is inside this web application, i suggest you check
> >> with the vendor and or developpers of that specific web application.
> >>
> >>
> >> If you want confirmation, just restart your webapplication without
> >> restarting tomcat (use the manager or lambda probe for that)
> >>
> >> reference:
> >>
> >> tomcat manager http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html
> >> lambda probe http://www.lambdaprobe.org
> >>
> >> markx3 a écrit :
> >> > Hello,
> >> >
> >> > I have a server running Windows 2003 server SP1.  8 GB of RAM.  Sun
> >> Java
> >> > J2SE 5.0 update 7 and Tomcat 5.5.20.
> >> >
> >> > Tomcat is used as our web server to review archived email.  The email
> >> is
> >> > stored in folders on the server and the archival system uses MS SQL
> >> 2000 SP4
> >> > on the backend.
> >> >
> >> > The problem is when we use Tomcat as our web server to review the
> >> email, and
> >> > we click on several emails, after awhile regardless of the different
> >> email
> >> > we click on, we get the same data displayed in our web browser.  This
> >> really
> >> > appears to be a caching issue with Tomcat, because every time we
> >> restart the
> >> > tomcat service, the problem goes away for a few days and then it
> >> happens
> >> > again.
> >> >
> >> > To try to fix the issue we gave Tomcat more memory in the Tomcat
> >> Properties
> >> > / Java tab.  We set initial memory pool to 128 MB of RAM and maximum
> >> memory
> >> > pool to 512 MB of RAM.  We also tried setting the IE 6.0 and 7.0
> >> browsers to
> >> > check for newer versions of the page every time I visit the webpage.
> >> Both
> >> > of these attempts didn't resolve the issue.
> >> >
> >> > Since I'm not a web developer I don't know what to tell you about the
> >> > website tomcat is hosting.  Except for that it was a .war file that
> >> tomcat
> >> > extracts once we place in into the tomcat5.5\webapps directory.  If you
> >> need
> >> > specifics on what this website is, please let me know and I can get
> >> that
> >> > info for you.  But looking through it there are all the usual files
> >> like
> >> > .jsp, .htm, etc.
> >> >
> >> > Also there isn't a proxy server on the network.  When users connect to
> >> the
> >> > website tomcat is hosting, the browser on the local machine is making a
> >> > direct connection since it's on the same subnet.
> >> >
> >> > Please let me know what suggestions we can use to try to resolve this
> >> issue.
> >> >
> >> >
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To start a new topic, e-mail: users@tomcat.apache.org
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To start a new topic, e-mail: users@tomcat.apache.org
> > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> > For additional commands, e-mail: users-help@tomcat.apache.org
> >
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Tomcat-cache-problem--tf2909995.html#a8168648
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat cache problem?

Posted by markx3 <ma...@qwest.net>.
Hello,

What do you mean by "and you probably should check the pragmas in the pages
(expire,
no-cache, etc). If they aren't present - you are screwed :-)"  

Can you please give me more info on what to do?

Thank you!

Leon Rosenberg-3 wrote:
> 
> and you probably should check the pragmas in the pages (expire,
> no-cache, etc). If they aren't present - you are screwed :-)
> 
> alternatively you could try to set your browser to get the page
> explicitely each time you request it (works with ie, firefox is dumb
> enough to ignore it, thinking it knows more about the actuallity of
> the page than you).
> 
> Have you actually check with TamperData or LiveHttpHeaders if the
> browser really sends GET requests upon refresh?
> 
> Leon
> 
> On 1/3/07, david.delbecq <da...@oma.be> wrote:
>> To make it short, tomcat does no caching of servlet / jsp output. Your
>> webapp is at fault
>>
>>
>> All tomcat does is handle the 'if-modified-since' header when serving
>> static data (what is not served by a servlet or a jsp, mainly pictures,
>> static html, css). The fact it goes back well when you restart tomcat
>> points out it's a problem with you specific web application. As you have
>> no knowledge of what is inside this web application, i suggest you check
>> with the vendor and or developpers of that specific web application.
>>
>>
>> If you want confirmation, just restart your webapplication without
>> restarting tomcat (use the manager or lambda probe for that)
>>
>> reference:
>>
>> tomcat manager http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html
>> lambda probe http://www.lambdaprobe.org
>>
>> markx3 a écrit :
>> > Hello,
>> >
>> > I have a server running Windows 2003 server SP1.  8 GB of RAM.  Sun
>> Java
>> > J2SE 5.0 update 7 and Tomcat 5.5.20.
>> >
>> > Tomcat is used as our web server to review archived email.  The email
>> is
>> > stored in folders on the server and the archival system uses MS SQL
>> 2000 SP4
>> > on the backend.
>> >
>> > The problem is when we use Tomcat as our web server to review the
>> email, and
>> > we click on several emails, after awhile regardless of the different
>> email
>> > we click on, we get the same data displayed in our web browser.  This
>> really
>> > appears to be a caching issue with Tomcat, because every time we
>> restart the
>> > tomcat service, the problem goes away for a few days and then it
>> happens
>> > again.
>> >
>> > To try to fix the issue we gave Tomcat more memory in the Tomcat
>> Properties
>> > / Java tab.  We set initial memory pool to 128 MB of RAM and maximum
>> memory
>> > pool to 512 MB of RAM.  We also tried setting the IE 6.0 and 7.0
>> browsers to
>> > check for newer versions of the page every time I visit the webpage. 
>> Both
>> > of these attempts didn't resolve the issue.
>> >
>> > Since I'm not a web developer I don't know what to tell you about the
>> > website tomcat is hosting.  Except for that it was a .war file that
>> tomcat
>> > extracts once we place in into the tomcat5.5\webapps directory.  If you
>> need
>> > specifics on what this website is, please let me know and I can get
>> that
>> > info for you.  But looking through it there are all the usual files
>> like
>> > .jsp, .htm, etc.
>> >
>> > Also there isn't a proxy server on the network.  When users connect to
>> the
>> > website tomcat is hosting, the browser on the local machine is making a
>> > direct connection since it's on the same subnet.
>> >
>> > Please let me know what suggestions we can use to try to resolve this
>> issue.
>> >
>> >
>>
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Tomcat-cache-problem--tf2909995.html#a8168648
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat cache problem?

Posted by Leon Rosenberg <ro...@googlemail.com>.
and you probably should check the pragmas in the pages (expire,
no-cache, etc). If they aren't present - you are screwed :-)

alternatively you could try to set your browser to get the page
explicitely each time you request it (works with ie, firefox is dumb
enough to ignore it, thinking it knows more about the actuallity of
the page than you).

Have you actually check with TamperData or LiveHttpHeaders if the
browser really sends GET requests upon refresh?

Leon

On 1/3/07, david.delbecq <da...@oma.be> wrote:
> To make it short, tomcat does no caching of servlet / jsp output. Your
> webapp is at fault
>
>
> All tomcat does is handle the 'if-modified-since' header when serving
> static data (what is not served by a servlet or a jsp, mainly pictures,
> static html, css). The fact it goes back well when you restart tomcat
> points out it's a problem with you specific web application. As you have
> no knowledge of what is inside this web application, i suggest you check
> with the vendor and or developpers of that specific web application.
>
>
> If you want confirmation, just restart your webapplication without
> restarting tomcat (use the manager or lambda probe for that)
>
> reference:
>
> tomcat manager http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html
> lambda probe http://www.lambdaprobe.org
>
> markx3 a écrit :
> > Hello,
> >
> > I have a server running Windows 2003 server SP1.  8 GB of RAM.  Sun Java
> > J2SE 5.0 update 7 and Tomcat 5.5.20.
> >
> > Tomcat is used as our web server to review archived email.  The email is
> > stored in folders on the server and the archival system uses MS SQL 2000 SP4
> > on the backend.
> >
> > The problem is when we use Tomcat as our web server to review the email, and
> > we click on several emails, after awhile regardless of the different email
> > we click on, we get the same data displayed in our web browser.  This really
> > appears to be a caching issue with Tomcat, because every time we restart the
> > tomcat service, the problem goes away for a few days and then it happens
> > again.
> >
> > To try to fix the issue we gave Tomcat more memory in the Tomcat Properties
> > / Java tab.  We set initial memory pool to 128 MB of RAM and maximum memory
> > pool to 512 MB of RAM.  We also tried setting the IE 6.0 and 7.0 browsers to
> > check for newer versions of the page every time I visit the webpage.  Both
> > of these attempts didn't resolve the issue.
> >
> > Since I'm not a web developer I don't know what to tell you about the
> > website tomcat is hosting.  Except for that it was a .war file that tomcat
> > extracts once we place in into the tomcat5.5\webapps directory.  If you need
> > specifics on what this website is, please let me know and I can get that
> > info for you.  But looking through it there are all the usual files like
> > .jsp, .htm, etc.
> >
> > Also there isn't a proxy server on the network.  When users connect to the
> > website tomcat is hosting, the browser on the local machine is making a
> > direct connection since it's on the same subnet.
> >
> > Please let me know what suggestions we can use to try to resolve this issue.
> >
> >
>
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat cache problem?

Posted by "david.delbecq" <da...@oma.be>.
To make it short, tomcat does no caching of servlet / jsp output. Your
webapp is at fault


All tomcat does is handle the 'if-modified-since' header when serving
static data (what is not served by a servlet or a jsp, mainly pictures,
static html, css). The fact it goes back well when you restart tomcat
points out it's a problem with you specific web application. As you have
no knowledge of what is inside this web application, i suggest you check
with the vendor and or developpers of that specific web application.


If you want confirmation, just restart your webapplication without
restarting tomcat (use the manager or lambda probe for that)

reference:

tomcat manager http://tomcat.apache.org/tomcat-5.5-doc/manager-howto.html
lambda probe http://www.lambdaprobe.org

markx3 a écrit :
> Hello, 
>
> I have a server running Windows 2003 server SP1.  8 GB of RAM.  Sun Java
> J2SE 5.0 update 7 and Tomcat 5.5.20. 
>
> Tomcat is used as our web server to review archived email.  The email is
> stored in folders on the server and the archival system uses MS SQL 2000 SP4
> on the backend. 
>
> The problem is when we use Tomcat as our web server to review the email, and
> we click on several emails, after awhile regardless of the different email
> we click on, we get the same data displayed in our web browser.  This really
> appears to be a caching issue with Tomcat, because every time we restart the
> tomcat service, the problem goes away for a few days and then it happens
> again.   
>
> To try to fix the issue we gave Tomcat more memory in the Tomcat Properties
> / Java tab.  We set initial memory pool to 128 MB of RAM and maximum memory
> pool to 512 MB of RAM.  We also tried setting the IE 6.0 and 7.0 browsers to
> check for newer versions of the page every time I visit the webpage.  Both
> of these attempts didn’t resolve the issue. 
>
> Since I’m not a web developer I don’t know what to tell you about the
> website tomcat is hosting.  Except for that it was a .war file that tomcat
> extracts once we place in into the tomcat5.5\webapps directory.  If you need
> specifics on what this website is, please let me know and I can get that
> info for you.  But looking through it there are all the usual files like
> .jsp, .htm, etc. 
>
> Also there isn’t a proxy server on the network.  When users connect to the
> website tomcat is hosting, the browser on the local machine is making a
> direct connection since it’s on the same subnet. 
>
> Please let me know what suggestions we can use to try to resolve this issue. 
>
>   


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org