{"id":842,"date":"2015-08-05T18:54:12","date_gmt":"2015-08-05T18:54:12","guid":{"rendered":"http:\/\/timony.com\/mickzblog\/?p=842"},"modified":"2015-08-05T19:15:28","modified_gmt":"2015-08-05T19:15:28","slug":"404-errors-on-pagespeed-generated-js-css","status":"publish","type":"post","link":"http:\/\/timony.com\/mickzblog\/2015\/08\/05\/404-errors-on-pagespeed-generated-js-css\/","title":{"rendered":"404 Errors On Pagespeed Generated JS &#038; CSS"},"content":{"rendered":"<p>To improve performance of the <a href=\"https:\/\/sbgrid.org\/\" target=\"_blank\">SBGrid Web site<\/a> I&#8217;ve been using Google&#8217;s Pagespeed Module for Apache. There is a module available for both Apache &amp; NGinx, and\u00a0 it can improve the performance of a Web site using a number of methods such as minimizing the number of JavaScript and CSS files that need to be downloaded.<\/p>\n<p>We were seeing random 404 errors on Google Pagespeed auto-generated JavaScript and CSS files on the <a href=\"https:\/\/sbgrid.org\/\" target=\"_blank\">SBGrid&#8217;s Web site.<\/a> These would only occur after the Web server was running for 2 days or more.<\/p>\n<p>The fix for us was to increase <a href=\"https:\/\/developers.google.com\/speed\/pagespeed\/module\/system\" target=\"_blank\">Pagespeed&#8217;s caches <\/a>and to give the host (it&#8217;s a VM) more RAM.<\/p>\n<p>These are the values that we set:<\/p>\n<ul>\n<li>ModPagespeedFileCacheSizeKb\n<ul>\n<li>Set the target size (in kilobytes) for file cache.<\/li>\n<\/ul>\n<\/li>\n<li>ModPagespeedLRUCacheKbPerProcess\n<ul>\n<li>Set the total size, in KB, of the per-process in-memory LRU cache.<\/li>\n<\/ul>\n<\/li>\n<li>ModPagespeedLRUCacheByteLimit\n<ul>\n<li>Set the maximum byte size entry to store in the per-process in-memory LRU cache.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>This is what we set them to:<\/p>\n<pre>ModPagespeedFileCacheSizeKb 102400\r\nModPagespeedLRUCacheKbPerProcess 1024\r\nModPagespeedLRUCacheByteLimit 16384<\/pre>\n<p>Use these with care and make sure that your host has enough RAM to fit everything into memory without <a href=\"https:\/\/en.wikipedia.org\/wiki\/Paging\" target=\"_blank\">paging<\/a>.<\/p>\n<p>Original Image from my <a href=\"https:\/\/www.flickr.com\/photos\/timony\/1884860422\/\" target=\"_blank\">Flickr Feed.<\/a><\/p>\n<p>References:<\/p>\n<ul>\n<li><a href=\"http:\/\/www.the-art-of-web.com\/system\/mod-pagespeed-settings\/\" target=\"_blank\">http:\/\/www.the-art-of-web.com\/system\/mod-pagespeed-settings\/<\/a><\/li>\n<li><a href=\"https:\/\/developers.google.com\/speed\/pagespeed\/module\/\" target=\"_blank\">https:\/\/developers.google.com\/speed\/pagespeed\/module\/<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To improve performance of the SBGrid Web site I&#8217;ve been using Google&#8217;s Pagespeed Module for Apache. There is a module available for both Apache &amp; NGinx, and\u00a0 it can improve the performance of a Web site using a number of methods such as minimizing the number of JavaScript and CSS files that need to be &hellip; <a href=\"http:\/\/timony.com\/mickzblog\/2015\/08\/05\/404-errors-on-pagespeed-generated-js-css\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">404 Errors On Pagespeed Generated JS &#038; CSS<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":858,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[18,671],"tags":[95,297,672,673,625],"class_list":["post-842","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-internet","category-web-server","tag-apache","tag-google","tag-pagespeed","tag-performance","tag-web-server"],"_links":{"self":[{"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/posts\/842","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/comments?post=842"}],"version-history":[{"count":7,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/posts\/842\/revisions"}],"predecessor-version":[{"id":860,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/posts\/842\/revisions\/860"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/media\/858"}],"wp:attachment":[{"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/media?parent=842"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/categories?post=842"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/timony.com\/mickzblog\/wp-json\/wp\/v2\/tags?post=842"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}