crowell / modpagespeed_tmp

Automatically exported from code.google.com/p/modpagespeed
Apache License 2.0
0 stars 0 forks source link

Slurp Directory caching php files #720

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I have a proxy with modpagespeed enabled for other external hosts.

When I set in the pagespeed.conf file:
ModPagespeedSlurpDirectory /var/cache/mod_pagespeed_slurp/
ModPagespeedSlurpReadOnly off

PHP files are stored in the slurp cache and my php pages stop working.
If I disable, no images are cached, I've configured memcached, but seems like 
every time images are rewrited and page loads increase without using slurp.

Is possible to use pagespeed as a reverse proxy for external hosts using 
memcached? 
Or, is possible to use pagespeed as a reverse proxy for external hosts using  
slurp but not caching dynamic files as php?

Original issue reported on code.google.com by brinh...@gmail.com on 6 Jun 2013 at 12:23

GoogleCodeExporter commented 9 years ago

Original comment by jmara...@google.com on 10 Jun 2013 at 6:23

GoogleCodeExporter commented 9 years ago
The Slurp commands are intended for testing and debugging, not proxying.  You 
should have a look at mod_proxy.

Original comment by jefftk@google.com on 10 Jun 2013 at 9:09

GoogleCodeExporter commented 9 years ago
I am using mod_proxy for proxy. But I'm trying to use Slurp for caching and 
it's caching php files that stops working.
Every first time the user access my reverse proxy pagespeed resources are being 
generated, in the second time it access the cached files, but then when another 
user tries to access again, all files are processed and images rewritten again.
When I try web page speed tests in the first access results are awful, in the 
second whe I try re-run test, results are great. Could you please help me? I've 
tried to enable and disable slurp, enable and disable page caching and 
memcached, but seems like in the reverse proxy mode, always all resources are 
rewritten. 

Original comment by brinh...@gmail.com on 10 Jun 2013 at 9:44

GoogleCodeExporter commented 9 years ago
To be blunt: don't use slurping, it doesn't do what you want.

Describe your setup and what you want to achieve, and we will be able to advise 
you on how to setup mod_pagespeed.

Original comment by matterb...@google.com on 11 Jun 2013 at 12:15

GoogleCodeExporter commented 9 years ago
Hi,
I have the following setup on CentOs:
Site1 \
Site2  |<--Apache Reverse Proxy+mod_pagespeed+cache <-- otimized sites <- User 
access
Site3 /                  (B)                             (C)              (D)
(A)
I have 3 web-sites on different hosts/servers on the internet behind my Apache 
Proxy with mod_pagespeed activated, I want users to access these sites 
optimized as most as possible with all mod_pagespeed capabilities + caching. 
I need Apache Reverse Proxy+Mod_pagespeed to work rewriting, optimizing and 
caching original hosts/sites(A) images/css/js and storing on (B)reverse proxy.
What's happening is that images/css/js are not being cached, everytime a user 
is requesting the page to (B) it's serving the original files, if the user 
reloads the page then it gets the pagespeed optimized, but then, when another 
user tries to access, everything is generated again.
For instance, in the first time I access the page I receive: 
URL=http://www.mydomain.com/wp-content/themes/business-lite/cyberchimps/lib/imag
es/achimps.png
After reloading I receive:
URL=http://www.mydomain.com/wp-content/themes/business-lite/cyberchimps/lib/imag
es/xachimps.png.pagespeed.ic.hbu4p6w98D.png
The problem is that every first time the user access, the pages are very slow 
and not optimized and if the user reloads the page, pagespeed is then active.
I've tried enabling memcached, pagecache directives, but nothing worked. 
I appreciate your help.

Original comment by brinh...@gmail.com on 11 Jun 2013 at 8:32

GoogleCodeExporter commented 9 years ago
How do you have caching configured for mod_pagespeed?  memcached?  File cache?  
What size?  Could you paste that part of your config file?

Could you share a link to your site that I could test?

Original comment by jefftk@google.com on 11 Jun 2013 at 8:39

GoogleCodeExporter commented 9 years ago
I've already tried with memcached activated but the same issue happened. 
Now I have the following configuration:
   ModPagespeedFileCachePath            "/var/cache/mod_pagespeed/"
   ModPagespeedCreateSharedMemoryMetadataCache "/var/cache/mod_pagespeed/" 64000
   ModPagespeedFileCacheSizeKb          102400
   ModPagespeedFileCacheCleanIntervalMs 3600000
   ModPagespeedFileCacheInodeLimit        500000
 #DISABLED ModPagespeedMemcachedServers localhost:11211

Follow shortened link for the page: http://noxss.com/1rL
Images:
First access: http://www.noxss.com/1rM
Second access: http://www.noxss.com/1rN

Original comment by brinh...@gmail.com on 11 Jun 2013 at 9:31

GoogleCodeExporter commented 9 years ago
Hi, could you please help me? I'm still experiencing the same issue.

Original comment by brinh...@gmail.com on 13 Jun 2013 at 8:54

GoogleCodeExporter commented 9 years ago
Your caching setup looks reasonable.

When I go to your page I see it optimized by pagespeed on the first load.

Original comment by jefftk@google.com on 14 Jun 2013 at 3:06