Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Apache Not Serving Latest Edited Page, But Older One.

Posted on 2003-03-14
8
Medium Priority
?
217 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
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
Introduction As you’re probably aware the HTTP protocol offers basic / weak authentication, which in combination with the relevant configuration on your web server, provides the ability to password protect all or part of your host.  If you were not…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month13 days, 5 hours left to enroll

578 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