Problem with crashing page and CSS - PS MOD

34 views
Skip to first unread message

Allemeble com

unread,
Dec 13, 2015, 2:33:53 PM12/13/15
to mod-pagespeed-discuss
hello everyone,

i have  problem with PS mod and css files.  Before using PS  i've been using minify script to combine  css and js files.  It's working great but  PS  includes  image resize and much more. So  few days ago i've started using PS  but i've noticed that it's crashing page.  I've inspected problem and check what's going on and i found css with strange chars:


? ????? ??k??8?
~ ?
N?? ?]?? Q ?S1U??>g????}??? J???C ?? ^Z??0?h? %?gfueEe E ? 0 ???Pl /???`] ??????aUmo V?????????w???? ?W????(?}?{*W?O ?)?????? )z?Ż7?????j?=????k? XW?O?????y??.?o?I ???????m?-_???-W_?? ?Z %ol,? S


First what i've done - i disabled probably all css filters what i suspect that causing this problem. Well after restarting apache nothing happens. Still problem  occurs.

hare is my demo site:
http://test.allemeble.com/

headers:

Cache-Control    max-age=0, no-cache
Connection    Keep-Alive
Content-Encoding    gzip
Content-Length    35451
Content-Type    text/html; charset=utf-8
Date    Sun, 13 Dec 2015 19:13:36 GMT
Keep-Alive    timeout=1, max=100
Server    Apache/2
Set-Cookie    country=3e1aec4a35eba8b22af24df660e52f2a54964c63%7E1; expires=Fri, 24-Nov-2062 14:27:14 GMT; path=/ lang=9447d59cea2f4c5aebdb5da6aa3a8e43a169f951%7Epl; expires=Fri, 24-Nov-2062 14:27:14 GMT; path=/ currency=6f1de220ff2f4bdf135a98052ce24f095508d1ab%7EPLN; expires=Fri, 24-Nov-2062 14:28:13 GMT; path=/
Vary    Accept-Encoding,User-Agent
X-Mod-Pagespeed    1.9.32.3-4448
X-Powered-By    PHP/5.4.30
pokaż źródło
Accept    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Encoding    gzip, deflate
Accept-Language    pl,en-US;q=0.7,en;q=0.3
Cache-Control    max-age=0
Connection    keep-alive
Cookie    _ga=GA1.2.639331580.1447600015; __zlcmid=Xif6a1egmuAlTE; country=3e1aec4a35eba8b22af24df660e52f2a54964c63%7E1; lang=9447d59cea2f4c5aebdb5da6aa3a8e43a169f951%7Epl; currency=6f1de220ff2f4bdf135a98052ce24f095508d1ab%7EPLN; session=c09s37bpnn0udf3joitn8ob787; _gat=1
Host    test.allemeble.com
Referer    http://test.allemeble.com/
User-Agent    Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0

and htaccess:

# Turn on URL rewriting
RewriteEngine On
RewriteCond %{HTTP_HOST} ^91.230.204.72
RewriteRule (.*) http://www.allemeble.com/$1 [R=301,L]
# BEGIN REQUIRED FOR WEBFONTS

AddType font/ttf .ttf
AddType font/eot .eot
AddType font/otf .otf
AddType font/woff .woff

#ModPagespeed off

<FilesMatch "\.(ttf|otf|eot|woff)$">
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
    </IfModule>
</FilesMatch>

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=604800, public"
</FilesMatch>

# END REQUIRED FOR WEBFONTS

# Installation directory
RewriteBase /
    RewriteCond %{HTTP_HOST} ^allemeble.com$
    RewriteRule ^(.*)$ http://www.allemeble.com/$1 [R=301,L]
# Allow these directories and files to be displayed directly:
# - index.php (DO NOT FORGET THIS!)
# - robots.txt
# - favicon.ico
# - Any file inside of the media/ directory
RewriteRule ^(robots\.txt|favicon\.ico|sitemap\.xml|w0lf.php|google1b97bfc1a32cd4de.html|uploads|media|sitemap2.xml|sitemap3.xml|google368f4f018f78cc80.html|135x135.jpg|MJ12_4ae5ebe4-a426-42a3-afce-da6b3df84508.txt|facebook.png|merchant_allemeble.xml|front_1.psd|back_1.psd|assets|generator) - [PT,L]

# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php?/$0 [PT,L,QSA]

ExpiresActive On
ExpiresByType image/gif A2592000
ExpiresByType image/png A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/x-icon A2592000
ExpiresByType text/css A2592000

ExpiresByType text/javascript A2592000
ExpiresByType application/javascript A2592000
ExpiresByType application/x-javascript A2592000

RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* – [F,L]

#<IfModule mod_deflate.c>
#  # Compress HTML, CSS, JavaScript, Text, XML and fonts
#  AddOutputFilterByType DEFLATE application/javascript
#  AddOutputFilterByType DEFLATE application/rss+xml
#  AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
#  AddOutputFilterByType DEFLATE application/x-font
#  AddOutputFilterByType DEFLATE application/x-font-opentype
#  AddOutputFilterByType DEFLATE application/x-font-otf
#  AddOutputFilterByType DEFLATE application/x-font-truetype
#  AddOutputFilterByType DEFLATE application/x-font-ttf
#  AddOutputFilterByType DEFLATE application/x-javascript
#  AddOutputFilterByType DEFLATE application/xhtml+xml
#  AddOutputFilterByType DEFLATE application/xml
#  AddOutputFilterByType DEFLATE font/opentype
#  AddOutputFilterByType DEFLATE font/otf
#  AddOutputFilterByType DEFLATE font/ttf
#  AddOutputFilterByType DEFLATE image/svg+xml
#  AddOutputFilterByType DEFLATE image/x-icon
#  AddOutputFilterByType DEFLATE text/css
#  AddOutputFilterByType DEFLATE text/html
#  AddOutputFilterByType DEFLATE text/javascript
#  AddOutputFilterByType DEFLATE text/plain
#  AddOutputFilterByType DEFLATE text/xml
#
#  # Remove browser bugs (only needed for really old browsers)
#  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
#</IfModule>
<IfModule pagespeed_module>
    ModPagespeed on
    ModPagespeedDisableFilters combine_css
    ModPagespeedDisableFilters rewrite_css,rewrite_style_attributes,outline_css,move_css_to_head,inline_google_font_css,inline_css,inline_import_to_link,flatten_css_imports,prioritize_critical_css
</IfModule>


thanks for any help!

kind regards
Mark

Otto van der Schaaf

unread,
Dec 13, 2015, 4:26:40 PM12/13/15
to mod-pagespeed-discuss
With Accept-Encoding:gzip, I could reproduce a bad response with one of the css urls [1] from your website.
It responded with what seemed like a gzip encoding - yet there was no Content-Encoding: gzip header in the response (though the ETag value did end in ":gz").

Then I queried that file without Accept-Encoding:gzip, and I observed a good looking css response.
Then I re-queried with Accept-Encoding:gzip, and I observed another good looking css response. 

After that I have not able to reproduce the problem.

It looks like there is no need for mod_pagespeed to be involved to reproduce (I have seen no X-Mod-Pagespeed response-headers or any other trace of mod_pagespeed). So I suspect there's something in your setup/configuration that does not play well with http caching and/or revalidation.


Otto

Allemeble com

unread,
Dec 14, 2015, 3:42:44 AM12/14/15
to mod-pagespeed-discuss
Well it's crazy!

I done the same as u -  i've disabled gzip in firefox.  then i refresh  page and everything work's fine.  After turning on gzip still no problem occurs.
It's very strange situation. I hope it's not some random  problem with configuration.

Btw. Well i found two places  where probably problem occurs:
main .htaccess:


<FilesMatch "\.(ttf|otf|eot|woff)$">
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
    </IfModule>
</FilesMatch>

<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
    Header set Cache-Control "max-age=604800, public"
</FilesMatch>

But im not sure.

Next place is second .htaccess in  /min/ folder.  It's specialy for minify script:

<IfModule mod_rewrite.c>
RewriteEngine on

# You may need RewriteBase on some servers
#RewriteBase /min

# rewrite URLs like "/min/f=..." to "/min/?f=..."
RewriteRule ^([bfg]=.*)  index.php?$1 [L,NE]
</IfModule>
<IfModule mod_env.c>
# In case AddOutputFilterByType has been added
SetEnv no-gzip
</IfModule>


What i found there  -  SetEnv no-gzip

Now im checking page - maybe  "no-gzip" caused problem with PS mod.


Allemeble com

unread,
Dec 14, 2015, 11:46:39 AM12/14/15
to mod-pagespeed-discuss
Well today site was  ok  until i go afk for 1-2h.  They when i visit website and click logo  instantly  homepage crashed.  It looks like css file cache expires. When  new file is loaded  it's  breaking  css encoding.

Any ideas what's wrong?

//when i turn off  PS mod in htaccess everything go back to normal
Reply all
Reply to author
Forward
0 new messages