Re: Apache proxy keeps cache directory empty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rainer Jung wrote:
> First personally I don't like the use of IfModule. That is a nice
> feature, if you want to be flexible in turning on or of functional
> blocks. But if you have a more rigid configuration and you need a
> feature, why enclose it in IfModule? If the module really isn't
> loaded, you like a clear startup error, that tells you about CacheRoot
> directive isn't known etc. and not instead just load without having
> the cache enabled. So I suggest removing the IfModule directives
> (assuming that the proxy and cache features are not just optional for
> you).
Thank you for you detailed tips. To be honest, I adopted the practice of
IfModule directives from the Linux distributions. You are right, that
IfModule is seldom useful for private configurations. I commented out
the IfModule directives, but as I already wrote, this doesn't change
anything.

> Can you see the two level directory structure for the cache underneath
> /var/cache/apache-proxy? Are ownerships and permissions OK?
>
> For further debugging you can:
>
> - Add
>
>  %{cache-hit}e %{cache-revalidate}e %{cache-miss}e
> %{cache-invalidate}e %{no-cache}e
I created a custom LogFile /var/log/apache2/proxy.log

LogFormat "%h %l %u %t \"%r\" %>s %b %{cache-hit}e %{cache-revalidate}e
%{cache-miss}e %{cache-invalidate}e %{no-cache}e" proxylog
CustomLog /var/log/apache2/proxy.log proxylog

The logged information is not very interesting. All the "cache*" entries
are "-":

Here is an example for www.apache.org and www.ubuntu.com from
/var/log/apache2/proxy.log. I pointed my browser the second time within
a minute to these addresses:

127.0.0.1 - - [19/Apr/2016:20:37:22 +0200] "GET http://www.apache.org/ HTTP/1.1" 200 12215 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:22 +0200] "GET http://www.apache.org/css/min.bootstrap.css HTTP/1.1" 200 12469 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:22 +0200] "GET http://www.apache.org/css/styles.css HTTP/1.1" 200 683 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:22 +0200] "GET http://www.apache.org/favicons/favicon-32x32.png HTTP/1.1" 200 2932 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:22 +0200] "GET http://www.apache.org/js/bootstrap.js HTTP/1.1" 200 11183 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:22 +0200] "GET http://www.apache.org/favicons/favicon.ico HTTP/1.1" 200 15086 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:22 +0200] "GET http://www.apache.org/js/jquery-2.1.1.min.js HTTP/1.1" 200 29505 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:22 +0200] "GET http://www.apache.org/favicons/favicon-194x194.png HTTP/1.1" 200 31800 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:23 +0200] "GET http://www.apache.org/favicons/favicon-96x96.png HTTP/1.1" 200 10679 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:24 +0200] "GET http://www.apache.org/favicons/favicon-16x16.png HTTP/1.1" 200 1922 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:24 +0200] "GET http://www.apache.org/favicons/android-chrome-192x192.png HTTP/1.1" 200 34004 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:25 +0200] "GET http://www.apache.org/img/karaf.jpg HTTP/1.1" 200 3538 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:25 +0200] "GET http://www.apache.org/img/ant.jpg HTTP/1.1" 200 6437 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:25 +0200] "GET http://www.apache.org/img/asf_logo.png HTTP/1.1" 200 21243 - - - - -
[...]
127.0.0.1 - - [19/Apr/2016:20:37:40 +0200] "GET http://www.ubuntu.com/ HTTP/1.1" 200 9157 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:40 +0200] "GET http://www.ubuntu.com/static/css/core-print.css?v=d6c3005 HTTP/1.1" 200 291 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:40 +0200] "GET http://www.ubuntu.com/static/js/core.js?v=fa96109 HTTP/1.1" 200 2187 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:40 +0200] "GET http://www.ubuntu.com/static/js/scratch.js?v=57ed62f HTTP/1.1" 200 5392 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:40 +0200] "GET http://www.ubuntu.com/static/css/styles.css?v=bd0338e HTTP/1.1" 200 44455 - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:41 +0200] "CONNECT assets.ubuntu.com:443 HTTP/1.1" 200 - - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:40 +0200] "CONNECT assets.ubuntu.com:443 HTTP/1.1" 200 - - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:41 +0200] "CONNECT assets.ubuntu.com:443 HTTP/1.1" 200 - - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:41 +0200] "CONNECT assets.ubuntu.com:443 HTTP/1.1" 200 - - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:41 +0200] "CONNECT assets.ubuntu.com:443 HTTP/1.1" 200 - - - - - -
127.0.0.1 - - [19/Apr/2016:20:37:41 +0200] "CONNECT assets.ubuntu.com:443 HTTP/1.1" 200 - - - - - - 

> - Add "CacheDetailHeader on" to the config and look at the response
> header "X-Cache-Detail" which tells you about the caching decision and
> reasons.
>
> - Increase the log level of mod_cache and mod_cache_disk via
>
>  LogLevel warn cache:trace8 cache_disk:trace8
>
> Depending on your request load and cache activity this might result in
> lots of error log output.
Unfortunately after adding these directives (and restarting/reloading
Apache of course), there is still nothing about mod_cache_disk activity
in error log. What does this mean?

> - Have a look for mod_cache and mod_cache_disk entries for the time
> between your newest working version and the broken one in CHANGES:
>
>   http://www.apache.org/dist/httpd/CHANGES_2.4
Ok, additionally I can try to do something like a Git bisect. But before
I'd like to see, that mod_cache_disk is working at all. Since there are
no entries from this module in error log, I am skeptical about this.

Greetings,
Björn

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx




[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux