Can't clear cache!

216 views
Skip to first unread message

Les Fenison

unread,
May 12, 2015, 5:27:38 PM5/12/15
to mod-pagesp...@googlegroups.com
I made a change to the css on my site and now it looks terrible unless I disable mod_pagespeed in my .htaccess

I have changed the cache control headers to 
Header set Cache-Control "max-age=0, no-cache, public"

I have disabled mod_expires

I have gone to mysite/pagespeed_admin and told it to purge the entire cache

Still the old css remains cached.  Can anyone tell me how to fix this?   For now, mod_pagespeed remains off until I can find a solution.

I am using memcached so I can't just go delete the stuff from the files cache

Here are the URLs

http://www.deltatechnicalservices.com    This is what it is suppose to look like and mod_pagespeed is off



Joshua Marantz

unread,
May 12, 2015, 9:03:22 PM5/12/15
to mod-pagespeed-discuss
I'm unclear on what change you made to the CSS on your site.  Are you saying that you made a change that you didn't like, and changed it back?  Or are you saying that you like the change, but mod_pagespeed breaks it?

Can you clarify:

1. Exactly what change did you make to the CSS?
2. What were your expires headers prior to removing mod_expires?
3. What exactly did you do to flush mod_pagespeed's cache?
4. Are you using the new 'purge' functionality described here: https://developers.google.com/speed/pagespeed/module/system#purge_cache -- specifically, did you enable that in your pagespeed.conf file?


Of course you should be able to flush the cache without doing this (and I'd like to find out why you can't).  But what's stopping you from (as an experiment), restarting memcached and apache to see if that gets the cache flushed?

-Josh

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/bb75eebe-e980-4512-a453-bc99a3681fe3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Les Fenison

unread,
May 12, 2015, 9:13:26 PM5/12/15
to mod-pagesp...@googlegroups.com
There were many changes to the css delta.min.css.    With mod_pagespeed off, the changes come thru, with it  on they do not.

You can see the differences in the top header of the site.  It looks very broken, images covered by the menu bar and other uglys when you append ?ModPagespeed=on to the URL

I expected the same look with pagespeed on or off.

As for purging the cache,  I did follow those instructions and I do have ModPagespeedEnableCachePurge on in my global config  however it didn't work as expected.  I am unable to find the correct thing to purge and I have never understood finding cached items nor purging cached items.   It rarely finds anything I search for or purge.

The problem can be seen clearly by comparing the looks of these two URLs

This one is corrupted

This one looks correct.

When attempting to purge, I attempted to purge   www.deltatechnicalservices.com/css/delta.min.css and nothing happened.

NO!  I don't want to restart memcached as that would dump the cache for all my sites that I have taken soooooo very long to build.  I am sure that would correct it but it is like killing a fly with a nuke.

Joshua Marantz

unread,
May 12, 2015, 9:29:58 PM5/12/15
to mod-pagespeed-discuss
Thanks, you answered questions 1, 3, and 4.  I'm still interested to know the answer to question 2:

2. What were your expires headers prior to removing mod_expires?

I also want more detail on #1.  Is it the case that mod_pagespeed is now correctly transmitting the previous version of delta.min.css?

When you attempted to purge 'www.deltatechnicalservices.com/css/delta.min.css', exactly what did you do?  Did you type that into the GUI?  What came out?  What do you see when you look at the Purge ui now?  It should reflect that delta.min.css was purged as of some specific date.

BTW I think you should specify the full URL including the "http://", but I also think we are resilient to that anyway.



I ran a few experiments on your site.  I think MPS works fine for everything but CSS.  A workaround you can use now is to disable all the css-related filters (including extend_cache_css.  But you are right that it is strange the CSS is coming out differently.

-Josh

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

Les Fenison

unread,
May 12, 2015, 9:38:47 PM5/12/15
to mod-pagesp...@googlegroups.com
Before the change, the  cache header for css was... 
   Header set Cache-Control "max-age=2592000, public
Now it is...
   Header set Cache-Control "max-age=0, no-cache, public"

as for mod expires..  It is off now but it was ExpiresByType text/css "access plus 1 day"

And yes, I believe it is sending the previous css from before the change.  

As for purging via the gui,  I have never been able to figure this out but it seems when in the "Show Metadata Cache" section you must start with http:// however in the purge cache section I need to leave off the http://

But this time it is not working no matter what..   

In the Show Meta Data Cache section, it shows this...

Metadata cache key:rname/aj_iQcXWPHWEFjlOFz-pcFx/http://www.deltatechnicalservices.com/css/delta.min.css@@_
cache_ok:false
can_revalidate:false
partitions:

When in the purge cache I get this when I submit the url without the http://

Added to Purge Set

Purge Set

Everything before this time stamp is invalid: Thu, 01 Jan 1970 00:00:00 GMT

I expected more below here showing that it had been added for purging but it wasn't.


Joshua Marantz

unread,
May 12, 2015, 9:51:56 PM5/12/15
to mod-pagespeed-discuss
I just took a screen-shot of the cache purge API on modpagespeed.com/pagespeed_admin/cache#purge_cache after having purged an image by typing in its full URL and then clicking "Purge Individual URL".  Note the table printed below specifying all the purged URLs and the time they were purged.

Inline image 1

What does this page look like on your server?

-Josh


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

Les Fenison

unread,
May 12, 2015, 9:56:11 PM5/12/15
to mod-pagesp...@googlegroups.com
There is nothing below, it just shows this...

Show Metadata Cache -Show Cache Structure -Physical Caches -Purge Cache
URL: 
User-Agent: 
 
CacheDetailStructure
HTTP CacheAsync LRUCache AprMemCache FileCache
Metadata CacheCompressed Async SharedMemCache AprMemCache FileCache
Property CacheCompressed AprMemCache FileCache
FileSystem Metadata CacheSharedMemCache
memcached server 10.1.2.34:11211 version 1.4.24 pid 2219 up 1090741 seconds 
bytes:                 469358931
bytes_read:            4053284225
bytes_written:         15522508743
cmd_get:               1660467
cmd_set:               857937
connection_structures: 154
curr_connections:      85
curr_items:            123862
evictions:             0
get_hits:              1165953
get_misses:            494514
limit_maxbytes:        0
pointer_size:          64
rusage_system:         87304727
rusage_user:           64
threads:               4
total_connections:     46757
total_items:           857937

memcached server 10.1.2.33:11211 version 1.4.24 pid 7173 up 1203265 seconds 
bytes:                 710750784
bytes_read:            6587768860
bytes_written:         14805299705
cmd_get:               1856370
cmd_set:               942345
connection_structures: 164
curr_connections:      85
curr_items:            174206
evictions:             0
get_hits:              1224169
get_misses:            632201
limit_maxbytes:        0
pointer_size:          64
rusage_system:         114920529
rusage_user:           64
threads:               4
total_connections:     45802
total_items:           942345

URL: 

Added to Purge Set

Purge Set

Everything before this time stamp is invalid: Thu, 01 Jan 1970 00:00:00 GMT

There is nothing below this point.

Joshua Marantz

unread,
May 12, 2015, 10:11:38 PM5/12/15
to mod-pagespeed-discuss
Something must be going wrong when you press the "Purge Individual URL" button.  When you do that, the server needs to write a file into FILE_CACHE_DIRECTORY/cache.purge.

Can you cat that file?  It's ascii.  Also do "ls -l" on that file, and see what it's permissions are.  Also please press the "purge" button and then look at the apache error log to see if an error message shows up there.

Thanks,
-Josh

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

Les Fenison

unread,
May 12, 2015, 10:16:06 PM5/12/15
to mod-pagesp...@googlegroups.com
I think we are learning something here..  The cache.purge file contains this....


the permissions are rw for owner only and owner is apache

The problem is that I am using memcached and not a file cache.    So why would it look at the file cache directory?  This inability to purge started ever since I started using memcached

Joshua Marantz

unread,
May 12, 2015, 10:23:29 PM5/12/15
to mod-pagespeed-discuss
That looks fine.  You can probably guess the syntax of the file.  You are right that there is a usability issue with memcached which might be at issue here.  The system will check the cache.purge file to validate memcached results.  However, if you have multiple apache instances sharing the same memcached (which is a sensible thing to do) you will need to issue the purge request on each server.

I realize this is not ideal.  It would be better if the GUI knew about the other servers and forwarded the requests, but it doesn't do that at this point.


So could this be the issue?  That the server you did the 'purge cache' operation on might not be the same server responding to the HTML requests to rewrite the CSS URLs?

If that's the issue we can discuss potential workarounds to make purging easier.

-Josh

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

Les Fenison

unread,
May 12, 2015, 10:28:28 PM5/12/15
to mod-pagesp...@googlegroups.com
The website is only on one server and that is the server I was on when I tried to purge.

There are 2 memcached servers and this server uses both of them like this...

ModPagespeedMemcachedServers 10.1.2.34:11211,10.1.2.33:11211

I do have a second webserver however, it only has one site caching and it is only used by me.

I am just looking for any method to purge.  I don't care if I use the gui, I just want to be able to enable pagespeed on that website and see the new css.   I saw the instructions for using curl however, my security doesn't allow pages to be accessed via curl for security reasons.

Joshua Marantz

unread,
May 12, 2015, 10:32:03 PM5/12/15
to mod-pagespeed-discuss
OK then I'm definitely not understanding why the cache.purge file is populated but the GUI's view of that looks empty.  Do you have multiple file-cache paths specified for different vhosts?

-Josh




--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

Les Fenison

unread,
May 12, 2015, 10:34:23 PM5/12/15
to mod-pagesp...@googlegroups.com
No, none of the virtual hosts specify the cache path. Just in the global config I have this...

    ModPagespeedFileCachePath            "/var/cache/mod_pagespeed/"

Joshua Marantz

unread,
May 12, 2015, 10:42:27 PM5/12/15
to mod-pagespeed-discuss
Do you also have InheritVhostConfig on?


--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

Les Fenison

unread,
May 12, 2015, 10:44:54 PM5/12/15
to mod-pagesp...@googlegroups.com
Yes, it is on in the global config only.

I did find a temporary workaround.  I copied my css file to another filename and updated my html to refer to the new file name and all is well.  However, I have this issue constantly and would like to find a way to avoid this..

Joshua Marantz

unread,
May 12, 2015, 10:56:56 PM5/12/15
to mod-pagespeed-discuss
I'm glad you found a workaround.  However cache-purging needs to work.  Let's figure this out :)

Please type anything you like (say "foo") into the purge cache URL bar and press the "purge individual URL" button, then tell me what you see in the GUI, and what you see in the file, and finally if there were any warning messages appended to the error log.

-Josh

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

Joshua Marantz

unread,
May 12, 2015, 10:57:43 PM5/12/15
to mod-pagespeed-discuss
Also try this on http://modpagespeed.com/pagespeed_admin/cache#purge_cache (it's open to the world).

Les Fenison

unread,
May 12, 2015, 11:04:24 PM5/12/15
to mod-pagesp...@googlegroups.com
I get the same result no matter what I type.  It just says "added to purge cache"

If I click Purge Entire Cache, it says "Purge Successful"

But in neither case does it actually purge anything.  And no, there is nothing in the error log.

And I did go to modpagespeed.com.  What is that?

Les Fenison

unread,
May 12, 2015, 11:09:44 PM5/12/15
to mod-pagesp...@googlegroups.com
These are curious settings that I have commented out..  Should I be using these?

    # ModPagespeedDownstreamCachePurgeLocationPrefix
    # ModPagespeedDownstreamCachePurgeMethod PURGE

Joshua Marantz

unread,
May 12, 2015, 11:15:36 PM5/12/15
to mod-pagespeed-discuss
modpagespeed.com is our demo site, which has an open admin page so you can see what cache-purging is supposed to look like.

But it's obvious enough it's not working on your server.  Could you send me (direct mail if you like, jmarantz at google) your full set of configuration files?  I'm not sure what I'll find in there.

Another wild question: are you running an MPM or module that SUs to a different user for each vhost?  Or are you running SELinux?

Could you try changing the file-permissions on cache.purge to allow world read access?

RE DownstreamCacheLocationPrefix and DownstreamCachePurgeMethod....no you don't need those for purging resources.  Those are for this: https://developers.google.com/speed/pagespeed/module/downstream-caching

--
You received this message because you are subscribed to the Google Groups "mod-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages