Link to home
Start Free TrialLog in
Avatar of psYcon
psYcon

asked on

Caching Nightmare on Apache

I have been trying to get to the bottom of this for several days now. Basically we have this webserver running Apache2 and I dont know why but it just caches the living daylights out of everything. So much that, if I ftp over an shtml file over to the server, I will not see any changes when  I refresh my browser window. The changes show up after several hours.

Even worse , if I delete the file and refresh the page, it still displays in the browser window. Now I have tried emptying cache+files to see if its the browser but its not. The only way for me to see changes is that I have to go to Apache Manager (web interface) and stop+start the server. I believe this totally empties the cache on the server or something.

I have also tried to enable mod_cache and change the default settings in there, but that didnt help.

Please advise.
Avatar of kalosi
kalosi

I am not really sure weaher the apache is the problem here. It could by your browsers cache. Are you 100% sure that it is tha apache not the browser?

david
Avatar of psYcon

ASKER

>>>It could by your browsers cache. Are you 100% sure that it is tha apache not the browser?

Positive. I have tested it on different computers. I have scoured all the documentation online relating to mod_expires, mod_cache and what not. So far I havent been able to find out any straightforward solution. As I said before, the only way to refresh is to stop+start the server. One more thing... the box is running Novell Netware 6.5
Avatar of PsiCop
Hrm. That'd odd. I'm using Apache 2 on NetWare v6.5 right now and I'm not seeing this.

Are you sure there's no Proxy server sitting between you and the webserver? BorderManager is not running on that server, is it?
Do you have anything between the server and the browser, like FastCache or BorderManager, or some other cache product that could be delaying the updates?
Avatar of psYcon

ASKER

Yes ! Bordermanager is running. However I have set it up in my Internet Explorer to directly access the internet instead of via a proxy. Do you think it has a role to play in caching even if I am directly connecting to this Web server? Also this webserver is within our company domain and not accessible to the outside world.
Depends on how BorderManager is configured. If it is caching outgoing requests, then yes, its probably the source of issues.
Yes, to expand on that - if you are doing "reverse proxy" - also known as website accelleration, you are caching outbound traffic from the Apache web server.  

Are you accessing the web server from the internal network or through the Internet?  Is the Apache web server "behind" the BorderManager server?  Is it being cached using the forward-proxy capabilities of BorderManager?  Is the Apache server using a private IP and NATting or proxying through BorderManager to present its public IP to the Internet?

Is there any way you can diagram your network as relates to the Apache server, the BorderManager server, the Internet and the browser you are using to access the Apache server - masking public IP's of course - using text in the posting window?  Or at least give some indication of how the data flow is configured, including proxy, nat, etc...?
Avatar of psYcon

ASKER

>>>Are you accessing the web server from the internal network or through the Internet?  Is the Apache web server "behind" the BorderManager server?

I am accessing it from the internal network. I also found out that we have a software called the Volera Excelerator which is enables web-caching :P

http://www.novell.com/documentation/volera/english/ex22sp2/

Do you suppose , disabling that might help? I have asked our sysadmin to try that. Will keep you posted. Thanks.
ASKER CERTIFIED SOLUTION
Avatar of PsiCop
PsiCop
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Try to add a

Header append Cache-Control: "must-revalidate"

to your Apache config file.

If there is any proxy caching and adheres to proxy and caching standards, than this should help!
Regarding Volera and your browser - is your network set up so your browser looks first at the Volera cache before going anywhere else for Web data?  

If so, try setting the address of your web server in the "bypass proxy" settings of your browser.
Avatar of psYcon

ASKER

Hi Folks, guess what, my Network admin fixed the problem on the server end. According to him it was something to do with the OS of the server that the webserver was running on. Something low level, like the filesystem protocol or something. It sounded pretty technical to me. Anyways I have decided that I will split points between ShineOn and PsiCop for their efforts. Thank you all.
Thanks for the points.  Any chance you could get your netadmin to post what the problem and fix was, to make this a good PAQ?
Avatar of psYcon

ASKER

sure. I'll hope to catch him tomorrow and ask him about it in detail.
Thanks, and I'm also curious to know exactly what the problem was. Always something to learn.
Avatar of psYcon

ASKER

This is the email that I received from our network admin..


>>>I did two different things which may have resolved the problem.  Technically, I should have tried one and then the other to determine which it was.  

I applied a patch for NSS (Novell Storage Services - the new NetWare file system)  which addressed some issues and then commented out two startup settings this patch added.

SET LEVEL 2 OPLOCKS ENABLED = OFF
SET CLIENT FILE CACHING ENABLED = OFF

The second setting may have affected the problem.  However, I must mention that we were having the issue prior to applying the patch or commenting out these settings that were added to startup, so I don't know if this had anything to do with it.   I also don't think they were enabled by default.

When I setup the webserver, I installed an option to use NFAP (Native File Access Pack)  It basically makes the NetWare 6.5 server appear as a native server to a workstation running an O/S without a Novell client.  

Windows workstations communicate with NetWare servers using their native Common Internet File System (CIFS) protocol.   Macintosh clients communicate with NetWare servers using their native AppleTalk Filing Protocol (AFP)    Linux/Unix clients communicate with NetWare servers using thier native Network Filing System (NFS)   Browsers communicate with NetWare servers using standard HTTP.

After I commented out the loading of these NFAP NLMS (NetWare Loadable Modules - like programs on a NetWare server)  we were able to see changes to content instantaneously.   While I can't specifically explain why this fixed our problem, I have a feeling that your workstations were using some different access method which may have caused the problem.    

I am not sure if our problem was so much a cache problem as a communication problem.    I was able to make changes dynamically to the original uploaded content on my workstation prior to making these changes and it displayed fine.   Even deleting shtml pages caused them not to show up.   That was what I wanted you guys to see....

<<<<

I am sure it had something to do with commenting out those lines. What do you guys think?
I think it was commenting out NFAP, personally.  I would recommend uncommenting the SET CLIENT FILE CACHING ENABLED=OFF.

What do you think, PsiCop?

I agree with restoring the SET CLIENT FILE CACHING ENABLED=OFF setting.

I really can't see how, in any rational setup, that NFAP could be the culprit. However, if he's right that the workstations were using some different access method, then that could be the problem. To reconcile that with my first sentence, I don't think such an arrangement is rational.
We've had the same problem here and the solution is much simpler.  The problem is coming from the PSA (Posix Symantec Agent). Just comment it out in the autoexec.ncf file, restard your server and then everything should be fine.

http://support.novell.com/cgi-bin/search/searchtid.cgi?/10089119.htm

Rem