Unable to purge single file

67 views
Skip to first unread message

Ivan Vlk

unread,
Jul 26, 2016, 1:47:01 PM7/26/16
to mod-pagespeed-discuss
Hi, I'm trying to purge single file, but it seems, like file is still cached.

I have both settings in config:

ModPagespeedEnableCachePurge on
ModPagespeedPurgeMethod PURGE

I'm using admin console:

/pagespeed_global_admin/cache#purge_cache

...and I'm entering full path to my original file, like

https://domain.xs/public/static/js/script.js

..I'm getting something like

Invalidation Time (Ascending)


Tue, 26 Jul 2016 17:14:21 GMT           
https://domain.xs/public/static/js/script.js


Unfortunatelly, nothing happens, web is still using cached file. Not sure, If I'm doing that correctly.

Any advice, please ?

Thank you.
Ivan

Otto van der Schaaf

unread,
Jul 26, 2016, 3:24:22 PM7/26/16
to mod-pagespeed-discuss
Do you have a mod_pagespeed cache configuration specific to the vhost you want to purge script.js for?
In that case, could you try purging via the non-global version of the admin page? 
Usually the non-global, vhost-specific admin page is mapped to /pagespeed_admin 

If the above did not help:

If you could tail the access log and grep the output for mod_pagespeed (as that is mentioned in the user-agent used to fetch) you should be able to verify that mod_pagespeed refetches the original file after a purge.

For example:
tail -f /path/to/access.log | grep mod_pagespeed

Could you try to verify and post about what the command shows you back here?

Otto


--
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/f4de0fc2-7ec9-4a2b-844a-f0213e180469%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ivan Vlk

unread,
Jul 28, 2016, 4:59:14 AM7/28/16
to mod-pagespeed-discuss
Thanks for your advice Otto. We have checked the access log and seems, like request has been successfuly delivered:

"GET /pagespeed_global_admin/cache?purge=https%3A%2F%2Fdomain.xy%2Fportaly%2Fnatura%2Fjs%2Fdetail%2Fdetail.js HTTP/1.1" 200 16 "http://server/pagespeed_global_admin/cache" "Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0"

..but it simply does nothing, so either it's not working from Global admin, or I'm putting wrong URL for the file.

Anyway, I'm going to look, how to enable vhost-based admin

Ivan


Dňa utorok, 26. júla 2016 21:24:22 UTC+2 Otto van der Schaaf napísal(-a):
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

Otto van der Schaaf

unread,
Jul 28, 2016, 6:44:35 AM7/28/16
to mod-pagespeed-discuss
Do you see pagespeed re-fetch detail.js in the access logs after purging it? If so, that would mean that the purge was successful, but pagespeed is somehow receiving a stale copy from an external caching layer.

As for putting in the wrong URL: if it's an option you could try what happens when you hit the "Purge entire cache" button.
If that does work as expected, the url you entered somehow was wrong.

The docs for setting up the admin pages are here:
https://developers.google.com/speed/pagespeed/module/admin#config


Otto

Ivan Vlk

unread,
Jul 28, 2016, 6:53:47 AM7/28/16
to mod-pagespeed-discuss
Doesn't seem, that it re-fetched at all :( Unfortunatelly I can't purge whole server cache, we have maybe 6 GB of cached data there :)

Anyway, I'll try to use vhost-based admin to get a step further with investigation.

Thank you.
Ivan

Dňa štvrtok, 28. júla 2016 12:44:35 UTC+2 Otto van der Schaaf napísal(-a):

Joshua Marantz

unread,
Jul 28, 2016, 8:10:47 AM7/28/16
to mod-pagespeed-discuss
Re-running this from the correct vhost's /pagespeed_admin sounds like a good plan.   Also it's worth double-checking the correct URL is given.  The main pitfall I see is domain-mapping directives.  Do you have ModPagespeedMapRewriteDomain or ModPagespeedShardDomain in your pagespeed.conf?

Also, are you using ModPagespeedLoadFromFile ?  

-Josh

To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

--
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/9df80cbf-26b4-4519-b556-58343da796f7%40googlegroups.com.

Ivan Vlk

unread,
Jul 28, 2016, 10:13:20 AM7/28/16
to mod-pagespeed-discuss
Yes Josh, we are using ModPagespeedLoadFromFile, what does it mean exactly in this case, please ?

Ivan



Dňa štvrtok, 28. júla 2016 14:10:47 UTC+2 jmarantz napísal(-a):
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

Joshua Marantz

unread,
Jul 28, 2016, 11:45:29 AM7/28/16
to mod-pagespeed-discuss
Good question. With LoadFromFile in theory you should not even *need* to purge.  In our test configuration, we have this:

ModPagespeedLoadFromFile "http://localhost:8080/mod_pagespeed_test/load_from_file/web_dir/" "/usr/local/apache2/htdocs/mod_pagespeed_test/load_from_file/file_dir/"

pagespeed/install/mod_pagespeed_test/load_from_file/file_dir/style.css has this content:
   body { background: blue; }


So if I do two 'wget' calls on that file, this is what I see.  The first one will be unoptimized, the second one will show the minified file:

body{background:#00f}

Now I edit /usr/local/apache2/htdocs/mod_pagespeed_test/load_from_file/file_dir/style.css changing 'blue' to 'black'.  I don't even need to purge, because pagespeed checks the file timestamp every time.  Again, the first time I wget the resource, it will not be optimized, and the second time it will be.

body { background: black; }
body{background:#000}


Can you describe for me what you observed -- maybe with wget like I did, that tells you that your purge was not working?  Something in the form of {wget, edit file, wget}.

-Josh

To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

--
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.

--
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/ae4df982-8906-49ad-8697-dd49ce2593cb%40googlegroups.com.

Ivan Vlk

unread,
Jul 28, 2016, 2:24:20 PM7/28/16
to mod-pagespeed-discuss
Josh, you described exactly, how I understand, this SHOULD work.

Only small difference is, that in some cases, if I change image or CSS and keep it's name, old content is being displayed. I saw this behaviour so many times here.

Question now is: what do you need from me to reproduce this problem ? My configs ?

Thank you.
Ivan

Dňa štvrtok, 28. júla 2016 17:45:29 UTC+2 jmarantz napísal(-a):
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

Otto van der Schaaf

unread,
Jul 28, 2016, 6:32:53 PM7/28/16
to mod-pagespeed-discuss
The LoadFromFile configuration would be helpful, seeing the full configuration would be even better.
You can post that here or email it to me.

Also:
Could you post the response headers of an example stale response (one based on a single original resource)?
One way you can grab response headers is by using curl: 
Or, for an in-place optimized version which doesn't have .pagespeed. in the url:
Subsequently, if you could get us the output of "stat <filename>" for the corresponding original file on disk, and also the output of "date", that would be useful.

Otto




To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-di...@googlegroups.com.

--
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.

--
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.

--
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/d051c920-8b9b-4070-aab3-cb46c9a7796d%40googlegroups.com.

Ivan Vlk

unread,
Jul 30, 2016, 9:55:40 AM7/30/16
to mod-pagespeed-discuss
Thank you Otto, I'll paste here everything needed next time, when this problem pop up.

Ivan

Dňa piatok, 29. júla 2016 0:32:53 UTC+2 Otto van der Schaaf napísal(-a):
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

Ivan Vlk

unread,
Aug 4, 2016, 6:48:04 AM8/4/16
to mod-pagespeed-discuss
OK, so here we go.

Configuration (base):

ModPagespeed off

   
ModPagespeedEnableCachePurge on
   
ModPagespeedPurgeMethod PURGE

   
ModPagespeedInheritVHostConfig on

   
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
   
ModPagespeedFileCachePath            "/var/cache/mod_pagespeed/"

   
ModPagespeedLogDir "/var/log/pagespeed"

   
ModPagespeedSslCertDirectory "/etc/ssl/certs"

   
ModPagespeedCreateSharedMemoryMetadataCache "/var/cache/mod_pagespeed_tmpfs/" 102400
   
ModPagespeedDefaultSharedMemoryCacheKB   102400

   
ModPagespeedFileCacheSizeKb          5120000
   
ModPagespeedFileCacheCleanIntervalMs 82800000
   
ModPagespeedCssFlattenMaxBytes       100000

   
ModPagespeedFileCacheInodeLimit        500000
   
ModPagespeedEnableFilters add_instrumentation

   
ModPagespeedStatistics on

   
<Location /mod_pagespeed_statistics>
       
SetHandler mod_pagespeed_statistics

       
AuthType Basic
       
AuthUserFile /etc/apache2/pagespeed_password
       
Require valid-user
       
AuthName Password
   
</Location>

    ModPagespeedStatisticsLogging on

    <Location /
pagespeed_console>
       
SetHandler pagespeed_console

       
AuthType Basic
       
AuthUserFile /etc/apache2/pagespeed_password
       
Require valid-user
       
AuthName Password
   
</Location>

    ModPagespeedMessageBufferSize 100000

    <Location /
mod_pagespeed_message>
       
SetHandler mod_pagespeed_message

       
AuthType Basic
       
AuthUserFile /etc/apache2/pagespeed_password
       
Require valid-user
       
AuthName Password
   
</Location>


    <Location /
pagespeed_global_admin>
       
SetHandler pagespeed_global_admin

       
AuthType Basic
       
AuthUserFile /etc/apache2/pagespeed_password
       
Require valid-user
       
AuthName Password
   
</Location>

    <Location /
pagespeed_admin>
       
SetHandler pagespeed_admin

       
AuthType Basic
       
AuthUserFile /etc/apache2/pagespeed_password
       
Require valid-user
       
AuthName Password
   
</Location>

    ModPagespeedLoadFromFileMatch "^https?:/
/www.sagrada-natura.(co.)?([a-z]{2,3})/portaly/" "/home/tomisko/Arganeol/production/public/portaly/"
    ModPagespeedLoadFromFileMatch "
^https?://www.sagrada-natura.(co.)?([a-z]{2,3})/global/" "/home/tomisko/Arganeol/production/public/global/"


Configuration (vhost / htaccess):

<IfModule pagespeed_module>
    ModPagespeed on
    ModPagespeedRewriteLevel CoreFilters
    ModPagespeedEnableFilters convert_jpeg_to_webp
    ModPagespeedEnableFilters collapse_whitespace,remove_comments
    ModPagespeedEnableFilters prioritize_critical_css
    ModPagespeedImageRecompressionQuality -1
    ModPagespeedDisallow */captcha/*
</IfModule>

Now fetching the cached combined file:

curl
-I -X GET https://www.sagrada-natura.cz/portaly,_natura,_css,_autocomplete.top.css+global,_css,_slidebars.css+portaly,_natura,_css,_layout.default.css+global,_css,_select2.css+portaly,_natura,_css,_konto,_registrace.css+portaly,_natura,_css,_general.css+portaly,_natura,_css,_autocomplete,_jquery-ui-autocomplete.min.css+portaly,_natura,_css,_jquery.qtip.min.css+global,_css,_jquery.sidr.light.css+portaly,_natura,_css,_locale,_cs,_localized.css.pagespeed.cc.dXnoVXVf4a.css
HTTP
/1.1 200 OK
Date: Thu, 04 Aug 2016 10:39:28 GMT
Server: Apache
Accept-Ranges: bytes
Expires: Thu, 03 Aug 2017 11:21:20 GMT
Cache-Control: max-age=31536000
Etag: W/"0"
Last-Modified: Wed, 03 Aug 2016 11:21:20 GMT
X
-Original-Content-Length: 104877
Vary: Accept-Encoding
Content-Length: 104877
Content-Type: text/css

Accessing plain file:

curl -I -X GET https://www.sagrada-natura.cz/portaly/natura/css/konto/registrace.css
HTTP
/1.1 200 OK
Date: Thu, 04 Aug 2016 10:41:30 GMT
Server: Apache
Expires: Thu, 04 Aug 2016 10:46:30 GMT
Cache-Control: max-age=300
Last-Modified: Thu, 04 Aug 2016 10:01:57 GMT
X
-Content-Type-Options: nosniff
Vary: Accept-Encoding
Transfer-Encoding: chunked
Content-Type: text/css



Here, we can clearly see, that even if source file if modified and Apache does know about that, it's not reflected into the combioned file, which is always being loaded from cache.

Here is server date:

$ date
Št aug  4 12:45:59 CEST 2016


Please let me know, if you still need the stat command, as this is 3rd party managed server and I need to get it allowed.

Actually we have evidence, that somwthing is going wrong here, any hint is wellcome :) I do believe, that it's just some missconfiguration, not a bug.

Thank you.
Ivan


Dňa sobota, 30. júla 2016 15:55:40 UTC+2 Ivan Vlk napísal(-a):

Otto van der Schaaf

unread,
Aug 4, 2016, 7:28:52 AM8/4/16
to mod-pagespeed-discuss
Thanks! Do you know if the stale responses only occur for requests to combined .pagespeed. urls? Or have you also seen it happen for .pagespeed. urls based on a single resource?

One additional observation is that when sending over a chrome user-agent when requesting the combined file, the Last-Modified header returned in the response is fresh(er). I'm not sure if that means anything in this context yet, but perhaps I can deduce something from that after reading some code.

Otto


oschaaf@ubuntu:~$ curl -I -X GET 'http://www.sagrada-natura.cz/portaly,_natura,_css,_autocomplete.top.css+global,_css,_slidebars.css+portaly,_natura,_css,_layout.default.css+global,_css,_select2.css+portaly,_natura,_css,_konto,_registrace.css+portaly,_natura,_css,_general.css+portaly,_natura,_css,_autocomplete,_jquery-ui-autocomplete.min.css+portaly,_natura,_css,_jquery.qtip.min.css+global,_css,_jquery.sidr.light.css+portaly,_natura,_css,_locale,_cs,_localized.css.pagespeed.cc.dXnoVXVf4a.css' -H 'Pragma: no-cache' -H 'Accept-Encoding: gzip, deflate, sdch' -H 'Accept-Language: en-US,en;q=0.8,nl;q=0.6' -H 'Upgrade-Insecure-Requests: 1' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Cache-Control: no-cache' -H 'Cookie: FRONTID=n66q1p3c7cbf7aoq5knrngsf36' -H 'Connection: keep-alive' --compressed
HTTP/1.1 200 OK
Date: Thu, 04 Aug 2016 10:58:46 GMT
Server: Apache
Last-Modified: Thu, 04 Aug 2016 10:53:47 GMT
X-Original-Content-Length: 104877
Vary: Accept-Encoding
X-Content-Type-Options: nosniff
Expires: Thu, 04 Aug 2016 10:58:47 GMT
Cache-Control: max-age=300,private
Content-Encoding: gzip
Content-Length: 18128
Keep-Alive: timeout=5, max=500
Connection: Keep-Alive
Content-Type: text/css

Ivan Vlk

unread,
Aug 4, 2016, 8:02:13 AM8/4/16
to mod-pagespeed-discuss
Thanks Otto.

I can confirm, that we observed similar bevaiour for single images, which have not been renamed, just their content have been replaced.

About the Chrome LM header - that's strange indeed. The timestamp seems to be correct, but old CSS file is still loaded :) I can see, that CSS changes are not reflected.

Ivan


Dňa štvrtok, 4. augusta 2016 13:28:52 UTC+2 Otto van der Schaaf napísal(-a):

Joshua Marantz

unread,
Aug 4, 2016, 9:32:42 AM8/4/16
to mod-pagespeed-discuss
I haven't dug through the detail in the combined CSS URL yet, but I just to sanity check a couple of things from earlier in the thread;

1. Does the LoadFromFileMatch directive in your config cover the CSS file you are changing?  If so, I'm astonished that does not update properly, even without a purge.
2. Do you cache the optmize HTML as well?  You could get you a stale CSS file if optimized HTML is cached, say, by Varnish.  I didn't see any downstream caching directives, or the risky "ModPagespeedModifyCachingHeaders off" directive.  But I just thought I'd check, because it's possible you might have some other setup that forces rewritten HTML to be cached.
3. When you issued the purge, did you send it to the correct vhost per earlier in the thread?

-Josh

To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

Ivan Vlk

unread,
Aug 4, 2016, 11:57:28 AM8/4/16
to mod-pagespeed-discuss
Hi Josh,

1. yes. If I drop whole vhost cache, file is recombined properly
2. not 100% sure for what you are asking here :) If you mean pagespeed.conf, I've put all above, there is nothing more. I have just normal directives for caching in the htaccess, pasting them below
3. yes. "whole cache" purge is working, when operating on the specific vhost. Single file purge does not work. However, as you mentinoed, for file mapping this should be irrelevant.

htaccess caching directives + deflate settings:
<ifModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/xml text/css text/plain
  AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json application/xml application/xhtml+xml
  AddOutputFilterByType DEFLATE image/x-icon image/vnd.microsoft.icon image/x-win-bitmap application/x-win-bitmap
</ifModule>

<IfModule mod_headers.c>
 
<FilesMatch "\\.(woff|svg|eot|ttf)$">
  Header set Cache-Control "max-age=2629743,public"
 
</FilesMatch>
 
<FilesMatch "\\.(ico|jpe?g|png|gif|swf|webp|cur)$">
  Header set Cache-Control "max-age=2629743, public"
 
</FilesMatch>
 
<FilesMatch "\\.(css)$">
  Header set Cache-Control "max-age=2629743, public"
 
</FilesMatch>
 
<FilesMatch "\\.(js)$">
  Header set Cache-Control "max-age=2629743, public"
 
</FilesMatch>
 
<FilesMatch "\\.(x?html?|php)$">
  Header set Cache-Control "max-age=600, private, must-revalidate"
 
</FilesMatch>
  Header unset ETag
  Header unset Last-Modified
</IfModule>



Thank you.
Ivan

Dňa štvrtok, 4. augusta 2016 15:32:42 UTC+2 jmarantz napísal(-a):
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mod-pagespeed-discuss/d051c920-8b9b-4070-aab3-cb46c9a7796d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joshua Marantz

unread,
Aug 5, 2016, 9:23:48 AM8/5/16
to mod-pagespeed-discuss
How do you 'drop the whole vhost cache'?  Are you going through the same Purge admin-page UI but just click the 'flush entire cache' button rather than flushing a single entry?  Or are you deleting all the files in the file-cache and restarting the server?  Or "touch $FILE_CACHE/cache.flush"?

RE "caching the optimized HTML" -- I was thinking that a possible cause of the symptom you saw was that downstream of PageSpeed, the optimized HTML was put into another cache, say Varnish or Squid, ignoring the restrictive caching directives that PageSpeed puts on the HTML.,  Sounds like this doesn't ring a bell.  Also 

Clarifying question #1 about LoadFromFileMatch: which CSS file were you updating?  How was it getting updated? The first question I want to understand is why that alone doesn't cause the output CSS to be updated.  For reference, your LoadFromFile directives are here:

    ModPagespeedLoadFromFileMatch "^https?://www.sagrada-natura.(co.)?([a-z]{2,3})/portaly/" "/home/tomisko/Arganeol/production/public/portaly/"
    ModPagespeedLoadFromFileMatch "
^https?://www.sagrada-natura.(co.)?([a-z]{2,3})/global/" "/home/tomisko/Arganeol/production/public/global/"

One question on that: what kind of file-system is /home/tomisko?  Is that local hard disk or a network share?  How exactly do the files get updated?  cp?

Can you do an "ls -l PATH_TO_UPDATED_FILE" before and after you update it?

-Josh

To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

Ivan Vlk

unread,
Aug 8, 2016, 3:14:50 PM8/8/16
to mod-pagespeed-discuss
Hi Josh,

I'm droping the cache via /pagespeed_admin on the vhost, by clicking on "Purge entire cache" button. It's only way how to force new file to be loaded.

File is updated by GIT (git pull) directly, so the timestamp is also updated. Server is running on Debian, so I suppose it's EXT4 - it's local HDD. Here is the updated file in the directory:

$ ls -l /home/tomisko/Arganeol/production/public/portaly/natura/css/konto/registrace.css
-rw-r--r-- 1 1004 100 26578 aug  4 12:01 /home/tomisko/Arganeol/production/public/portaly/natura/css/konto/registrace.css


Timestamp is correct. It's updated correctly, so I don't think this can be an issue.

Thank you.
Ivan


Dňa piatok, 5. augusta 2016 15:23:48 UTC+2 jmarantz napísal(-a):
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

Joshua Marantz

unread,
Aug 8, 2016, 9:39:45 PM8/8/16
to mod-pagespeed-discuss
I have to admit that complex regexps are not my strong suit.   But I looked at your conf file pasted earlier, the filename you pasted below and I see this:
  • Regex from LoadFromFileMatch:    ^https?://www.sagrada-natura.(co.)?([a-z]{2,3})/portaly/"
  • URL from log:                     https://www.sagrada-natura.cz/portaly,_natura,_css,_autocomplete.top.css+global,_css,_slidebars.css+portaly,_natura,_css,_layout.default.css+global,_css,_select2.css+portaly,_natura,_css,_konto,_registrace.css+portaly,_natura,_css,_general.css+portaly,_natura,_css,_autocomplete,_jquery-ui-autocomplete.min.css+portaly,_natura,_css,_jquery.qtip.min.css+global,_css,_jquery.sidr.light.css+portaly,_natura,_css,_locale,_cs,_localized.css.pagespeed.cc.dXnoVXVf4a.css
Note that the LoadFromFileMatch uses top-level domain (TLD) ".co" and the URL pasted from the log uses TLD ".cz".  It does not look to me like that would match, even with the  ?([a-z]{2,3}) modifier.  Are you sure you have those matching correctly?  To me it looks like your LoadFromFileMatch directives cannot be working, and mod_pagespeed will fall back to http fetching.

Similarly, does the URL you had pasted into the admin console "purge" command have a ".cz" extension?  If not, that could be the purging problem.  I don't see anything mapping between .cz and .co in your conf file.

-Josh


To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

Ivan Vlk

unread,
Aug 9, 2016, 6:01:12 AM8/9/16
to mod-pagespeed-discuss
Hi Josh,

I'm using this tool to verify Regex. I believe, that MPS is using PCRE.

https://www.debuggex.com/

Please len me know, if any different norm is used.

About the "co." - it's actually in the brackets with question mark aftr, what mean, that is optional part of the string. In another words, if there is nothing like "co.", it's valid and ".cz" matching last part of regex definition.

Thank you.
Ivan

Dňa utorok, 9. augusta 2016 3:39:45 UTC+2 jmarantz napísal(-a):
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

Joshua Marantz

unread,
Aug 9, 2016, 7:38:08 AM8/9/16
to mod-pagespeed-discuss
debugrex.com a very nice tool -- thanks!  However MPS uses RE2, not PCRE.  I'm not sure if that makes a difference to the correctness of your regex.  I know RE2 has a slightly more restrictive set of features so it can be faster and smaller.

I see now why you set up your regex that way: to match .co.uk or .com.  I'm pretty sure this can be done without the ([a-z]{2,3}) syntax.  Maybe ([a-z][a-z][a-z]?\.)? but I admit I haven't tested it and this might be a red herring.

-Josh

To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

Jeff Kaufman

unread,
Aug 9, 2016, 3:56:41 PM8/9/16
to mod-pagespeed-discuss
Aside: since both PageSpeed and Golang use RE2, a good regular expression tester is https://regex-golang.appspot.com/assets/html/index.html

--
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-discuss+unsub...@googlegroups.com.

Joshua Marantz

unread,
Aug 12, 2016, 11:23:10 AM8/12/16
to mod-pagespeed-discuss
Using https://regex-golang.appspot.com/assets/html/index.html I confirmed that regex "^https?://www.sagrada-natura.(co.)?([a-z]{2,3})/portaly/" matches URL  https://www.sagrada-natura.cz/portaly/natural/foo.css .

I thought I had something there.  I wonder if we have a logical problem timestamp checking a member of a combined resource.  Ivan -- did you say this had also happened for images, which are simpler from a resource-mapping perspective compared to combined CSS files?

-Josh

On Tue, Aug 9, 2016 at 3:56 PM, 'Jeff Kaufman' via mod-pagespeed-discuss <mod-pagesp...@googlegroups.com> wrote:
Aside: since both PageSpeed and Golang use RE2, a good regular expression tester is https://regex-golang.appspot.com/assets/html/index.html

--
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-discuss+unsub...@googlegroups.com.

Ivan Vlk

unread,
Aug 23, 2016, 1:15:52 PM8/23/16
to mod-pagespeed-discuss
Sorry guys, I was ooo for 2 weeks. So, now we know, that regex is working fine, question is what else to chceck :)

Josh, not sure if I got your point. Wolud you like me to reproduce the problem by using some image on our server, please ?

Thank you.
Ivan

Dňa piatok, 12. augusta 2016 17:23:10 UTC+2 jmarantz napísal(-a):
Using https://regex-golang.appspot.com/assets/html/index.html I confirmed that regex "^https?://www.sagrada-natura.(co.)?([a-z]{2,3})/portaly/" matches URL  https://www.sagrada-natura.cz/portaly/natural/foo.css .

I thought I had something there.  I wonder if we have a logical problem timestamp checking a member of a combined resource.  Ivan -- did you say this had also happened for images, which are simpler from a resource-mapping perspective compared to combined CSS files?

-Josh
On Tue, Aug 9, 2016 at 3:56 PM, 'Jeff Kaufman' via mod-pagespeed-discuss <mod-pagesp...@googlegroups.com> wrote:
Aside: since both PageSpeed and Golang use RE2, a good regular expression tester is https://regex-golang.appspot.com/assets/html/index.html
To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.

Joshua Marantz

unread,
Aug 23, 2016, 1:20:24 PM8/23/16
to mod-pagespeed-discuss

Yes, reproducing with a single image would be great.  With combined CSS there are many places in the flow where we could run into trouble.


To unsubscribe from this group and stop receiving emails from it, send an email to mod-pagespeed-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsubscri...@googlegroups.com.

--
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-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages