?
Solved

Apache Not Serving Latest Edited Page, But Older One.

Posted on 2003-03-14
8
Medium Priority
?
213 Views
Last Modified: 2011-09-20
Hello Everybody,

  I run the website www.rulethenet.com/rule.jsp. As you can see it has current news that is updated every 15 minutes by some parsing and other programs. The traffic to the site has been growing and yesterday it reached about 30,000. The page size is 80 K. (I am mentioning this in case the volume of traffic could be the cause of the problem.) The server is a Dell Pentium single processor 1.5 GHz with about 256 MB RAM.

  Yesterday I noticed a problem a few times. For example at 3:20 pm the page that was being served was the one edited just before 2:30 pm and with "Last Updated: Fri Mar 13, 2:30 pm ET...". I went to the directory where the rule.jsp file is stored and checked it. In that file the text was "Last Updated: Fri Mar 13, 3:30 pm ET...". So Apache was not serving this file but rather an older version (which actually no longer existed in the directory for rule.jsp). After sometime Apache started catching up, and about after an hour it was showing the latest files.

  Thanks in advance for solutions.

Regards,

RtN

0
Comment
Question by:RuletheNet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 

Author Comment

by:RuletheNet
ID: 8137902
Couple of clarifications: The OS is Linux. And I did refresh the browser and got my friend to check on his PC. He was also served the old file.
0
 
LVL 1

Expert Comment

by:PCBackup
ID: 8139620
Hmmm, that's an interesting situation, since the old file version does not exist on the server.  I figure that the webpage contents are being cached somewhere between the apache server and your (and your friends) web browser.

Depending upon what sits between these ends, the problem could be several things.  First off, if there are any firewall appliances in front of your Linux server, they could be caching contents for the purpose of load minimization.  Also, are you running the Linux firewall software agent, which might be performing caching?  Also, your ISP service could be performing some caching as well.  Lastly, if you are accessing it behind a different network firewall, it might also be caching the result there, which I have seen particularly in my situation behind a corporate firewall.

You didn't mention what version of Apache and Linux you are running, but you are obviously using java server pages.  Maybe the java servlet engine is performing the caching.  When you see the problem again (not desireable but probable), it might be beneficial to "bounce" the java server engine to see if it is the problem.  It might have cache timeout settings as well that you can adjust in the configuration.

Let me know more about what is in the path of your server and web browser, and maybe we can whittle it down to just one thing.

Gene
0
 
LVL 8

Accepted Solution

by:
heskyttberg earned 2000 total points
ID: 8139647
Hi!

When it is dragging behind next time go to the server and run top, or any other software to look at the load, it might be so that it's loaded too much and the disk cache dosen't catch up with all the changes.

I don't think this is a apache problem, but rather a disk/cache either on raid if you are running it or with linux own RAM disk cache.

If you have that kind of traffic I would recommend getting another 256Mb into the server.

How many apache daemons are you constantly running ?
Each one will eat about 1Mb RAM so if you are running 100 that is at least 100Mb RAM for apache alone, and I guess tomcat will want some too. I don't know how much tomcat uses butit would probably be something around 10MB for first and then some additonal for each thread.

Regards
/Hans - Erik Skyttberg
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 

Expert Comment

by:sumanda
ID: 8140139
Did you check whether your jsp pages are explicitely told not to cache. There should be some commands on the top of the page, like this:

response.setHeader("Cache-Control","no-store"); //HTTP 1.1
response.setHeader("Pragma","no-cache"); //HTTP 1.0
response.setDateHeader ("Expires", 0); //prevents caching at the proxy server



0
 

Author Comment

by:RuletheNet
ID: 8162678
Thanks all, I am checking out your suggestions. Will get back with the results.

Regards,

RtN
0
 

Author Comment

by:RuletheNet
ID: 8164588
Points to Heskyttberg for most information and thanks to all for your answers.

Regards,

RtN
0
 

Author Comment

by:RuletheNet
ID: 8164590
Points to Hans for most information and thanks to all for your answers.

Regards,

RtN
0
 
LVL 1

Expert Comment

by:PCBackup
ID: 8166335
So, what did you end up finding was the problem?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question