pagespeed FileCacheSizeKb not working ?

26 views
Skip to first unread message

Hoang Le

unread,
Mar 3, 2018, 5:42:16 AM3/3/18
to ngx-pagespeed-discuss
Hi,
anyone can help me understand this problem. many thanks !!

i have setting 
pagespeed FileCachePath /var/ngx_pagespeed_cache;
pagespeed
FileCacheSizeKb            102400; #(100MB)
pagespeed
FileCacheCleanIntervalMs   3600000;
pagespeed
FileCacheInodeLimit        500000;

but i don't know why directory  /var/ngx_pagespeed_cache have more than 2GB and page_speed not clean cache

this is full config page_speed i have used.


Add this config to nginx vhost

#page speed config
pagespeed on
;
pagespeed
LowercaseHtmlNames on;
pagespeed
ModifyCachingHeaders on;
pagespeed
EnableFilters combine_css,combine_javascript;
pagespeed
PreserveUrlRelativity on;
pagespeed
EnableFilters lazyload_images;
pagespeed
EnableFilters defer_javascript;
pagespeed
EnableFilters recompress_jpeg;
pagespeed
EnableFilters recompress_png;
pagespeed
EnableFilters rewrite_images;
pagespeed
EnableFilters convert_png_to_jpeg;
pagespeed
EnableFilters convert_jpeg_to_progressive;
pagespeed
EnableFilters convert_jpeg_to_webp;
pagespeed
EnableFilters collapse_whitespace,remove_comments;
pagespeed
EnableFilters prioritize_critical_css;
pagespeed
AllowVaryOn "Accept, Save-Data";
pagespeed
InPlaceResourceOptimization on;
pagespeed
EnableFilters extend_cache;
pagespeed
LazyloadImagesAfterOnload off;
pagespeed
LazyloadImagesBlankUrl "https://www.gstatic.com/psa/static/1.gif";
pagespeed
EnableCachePurge on;
pagespeed
PurgeMethod PURGE;

#pagespeed ForceCaching on;

# pagespeed admin
#pagespeed StatisticsPath /ngx_pagespeed_statistics;
#pagespeed MessagesPath /ngx_pagespeed_message;
#pagespeed ConsolePath /pagespeed_console;
#pagespeed AdminPath /pagespeed_admin;

# Needs to exist and be writable by nginx.  Use tmpfs for best performance.
pagespeed
FileCachePath /var/ngx_pagespeed_cache;
pagespeed
FileCacheSizeKb            102400;
pagespeed
FileCacheCleanIntervalMs   3600000;
pagespeed
FileCacheInodeLimit        500000;

# Ensure requests for pagespeed optimized resources go to the pagespeed handler
# and no extraneous headers get set.
location
~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
add_header
"" "";
}
location
~ "^/pagespeed_static/" { }
location
~ "^/ngx_pagespeed_beacon$" { }


Otto van der Schaaf

unread,
Mar 3, 2018, 5:56:38 AM3/3/18
to ngx-pagesp...@googlegroups.com
The cache gets cleaned hourly with your configuration. 
Could it be that it regrows to 2GB really fast after cleaning?
(Note: If the site has a lot of traffic and actually needs multiple GB's of cache to fit a
reasonable working set, having it trimmed down to 100MB every hour may be suboptimal).

Otto

--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.

Joshua Marantz

unread,
Mar 3, 2018, 10:00:10 AM3/3/18
to ngx-pagesp...@googlegroups.com
Another possibility is there could be permissions problems cleaning the cache.  Those would probably show up in the nginx logs hourly.

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

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