Re: [EMAIL PROTECTED] mod_deflate/mod_mem_cache issues

2006-07-20 Thread Apache User
Thanks for the help, Joshua. I configured apache to use mod_disk_cache and 
it seems to be working and compressed content is getting served up 
correctly. Guess that means it is a bug in mod_mem_cache ?


I still have to run some tests to check the performance of (caching on disk 
+ compression) vs ( caching in memory) though.



From: "Joshua Slive" <[EMAIL PROTECTED]>
Reply-To: users@httpd.apache.org
To: users@httpd.apache.org
Subject: Re: [EMAIL PROTECTED] mod_deflate/mod_mem_cache issues
Date: Wed, 19 Jul 2006 20:01:48 -0400

On 7/19/06, Apache User <[EMAIL PROTECTED]> wrote:

Hi,

I have an Apache 2.2.2 setup on a Redhat box. Mod_proxy(mod_proxy_ajp) is
being used to connect to tomcat on the same machine. Caching is 
implemented

using mod_cache(mod_mem_cache). This setup works fine and caching seems to
be working as expected.

The problem occurs when I try to optimize further by supporting HTML
compression using mod_deflate. In this case, whenever deflated documents 
are
served by the cache the Content-length returned is 0. Is this a known 
issue

? Can mod_deflate and mod_mem_cache be used together ? Or is it that
mod_mem_cache cannot handle compressed content ?


I don't have any specific info on this problem, but I'd highly
recommend using mod_disk_cache in place of mod_mem_cache.  It is
better tested, and will be more performant in most scenarios.

Joshua.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



_
FREE pop-up blocking with the new MSN Toolbar – get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/



-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [EMAIL PROTECTED] mod_deflate/mod_mem_cache issues

2006-07-19 Thread Joshua Slive

On 7/19/06, Apache User <[EMAIL PROTECTED]> wrote:

Hi,

I have an Apache 2.2.2 setup on a Redhat box. Mod_proxy(mod_proxy_ajp) is
being used to connect to tomcat on the same machine. Caching is implemented
using mod_cache(mod_mem_cache). This setup works fine and caching seems to
be working as expected.

The problem occurs when I try to optimize further by supporting HTML
compression using mod_deflate. In this case, whenever deflated documents are
served by the cache the Content-length returned is 0. Is this a known issue
? Can mod_deflate and mod_mem_cache be used together ? Or is it that
mod_mem_cache cannot handle compressed content ?


I don't have any specific info on this problem, but I'd highly
recommend using mod_disk_cache in place of mod_mem_cache.  It is
better tested, and will be more performant in most scenarios.

Joshua.

-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[EMAIL PROTECTED] mod_deflate/mod_mem_cache issues

2006-07-19 Thread Apache User

Hi,

I have an Apache 2.2.2 setup on a Redhat box. Mod_proxy(mod_proxy_ajp) is 
being used to connect to tomcat on the same machine. Caching is implemented 
using mod_cache(mod_mem_cache). This setup works fine and caching seems to 
be working as expected.


The problem occurs when I try to optimize further by supporting HTML 
compression using mod_deflate. In this case, whenever deflated documents are 
served by the cache the Content-length returned is 0. Is this a known issue 
? Can mod_deflate and mod_mem_cache be used together ? Or is it that 
mod_mem_cache cannot handle compressed content ?


Here's the output from lwp-request( the second one shows the serving up of 
cached content)


[EMAIL PROTECTED] lwp-request -uedsx http://localhost:80/Main.do -H 
Accept-Encoding:gzip,deflate

LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://localhost:80/Main.do
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::Protocol::collect: read 670 bytes
LWP::Protocol::collect: read 4096 bytes
LWP::Protocol::collect: read 3002 bytes
LWP::UserAgent::request: Simple response: OK
GET http://localhost:80/Main.do
200 OK
Cache-Control: no-store, must-revalidate, post-check=0, pre-check=0
Connection: close
Date: Tue, 18 Jul 2006 18:27:35 GMT
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Content-Length: 7768
Content-Type: text/html;charset=ISO-8859-1
Expires: Tue, 18 Jul 2006 18:30:37 GMT
Last-Modified: Tue, 18 Jul 2006 18:27:37 GMT
Client-Date: Tue, 18 Jul 2006 18:27:37 GMT
Client-Peer: 127.0.0.1:80
Client-Response-Num: 1

[EMAIL PROTECTED] lwp-request -uedsx http://localhost:80/Main.do -H 
Accept-Encoding:gzip,deflate

LWP::UserAgent::new: ()
LWP::UserAgent::request: ()
LWP::UserAgent::send_request: GET http://localhost:80/Main.do
LWP::UserAgent::_need_proxy: Not proxied
LWP::Protocol::http::request: ()
LWP::UserAgent::request: Simple response: OK
GET http://localhost:80/Main.do
200 OK
Cache-Control: no-store, must-revalidate, post-check=0, pre-check=0
Connection: close
Date: Tue, 18 Jul 2006 18:28:32 GMT
Age: 56
Server: Apache/2.2.2 (Unix)
Vary: Accept-Encoding,User-Agent
Content-Encoding: gzip
Content-Length: 0
Content-Type: text/html;charset=ISO-8859-1
Expires: Tue, 18 Jul 2006 18:30:37 GMT
Last-Modified: Tue, 18 Jul 2006 18:27:37 GMT
Client-Date: Tue, 18 Jul 2006 18:28:32 GMT
Client-Peer: 127.0.0.1:80
Client-Response-Num: 1

Here's the deflate.log contents
"GET /Main.do HTTP/1.1" 7750/35169 (22%)
"GET /Main.do HTTP/1.1" -/- (-%)

Relevant sections of my httpd.conf:

LoadModule cache_module modules/mod_cache.so
LoadModule mem_cache_module modules/mod_mem_cache.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so


#
# mod_expires settings
#

ExpiresActive On
ExpiresByType text/css "access plus 1 day"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"


#
# mod_proxy/mod_proxy ajp settings
#

ProxyRequests Off

Order deny,allow
Allow from all

ProxyPass /favicon.ico !
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/


#
# mod_cache/mod_mem_cache settings
#


  CacheEnable mem /
  CacheStoreNoStore On
#   CacheIgnoreCacheControl On
#   CacheIgnoreNoLastMod On
#   CacheMaxExpire 150
  MCacheSize  4096
  MCacheMaxObjectCount 200
  MCacheMinObjectSize 1
  MCacheMaxObjectSize 524288



#
# Worker MPM settings
#

StartServers 1
MaxClients 250
ThreadsPerChild 50
MinSpareThreads 25
MaxSpareThreads 75



 SetOutputFilter DEFLATE
 SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png|rar|zip)$ no-gzip

 DeflateFilterNote Input instream
 DeflateFilterNote Output outstream
 DeflateFilterNote Ratio ratio
 LogFormat '"%r" %{outstream}n/%{instream}n (%{ratio}n%%)' deflate
 CustomLog logs/deflate.log deflate

 BrowserMatch ^Mozilla/4 gzip-only-text/html
 BrowserMatch ^Mozilla/4\.0[678] no-gzip
 BrowserMatch \bMSIE !no-gzip !gzip-only-text/html

 
   Header append Vary User-Agent
 


Any insight, suggestions or assistance with this would be very much 
appreciated.  Thank you.


--S

_
Express yourself instantly with MSN Messenger! Download today - it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/



-
The official User-To-User support forum of the Apache HTTP Server Project.
See http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
  "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]