Open xvids opened 8 years ago
Could you double-check the MapOriginDomain configuration? Are you able to connect to origin_to_fetch_from when you attempt to do so from the server running ngx_pagespeed? The log messages you posted indicate that ngx_pagespeed is not able to connect to a server to fetch css/js/images for optimization.
Looking again at the following configuration line, I'm wondering if you accidentally did not replace the placeholders from the documentation?
pagespeed MapOriginDomain origin_to_fetch_from origin_specified_in_html [host_header];
Hello !
I've exactly the same issue. I have many log files like this one :
2018/09/06 13:45:49 [error] 13677#13692: [ngx_pagespeed 1.12.34.2-0] Serf status 111(Connection refused) polling for 1 threaded fetches for 0.05 seconds
Do you have any idea why I still get this error ? Thanks !
Thing is, I disabled all MapOriginDomain
lines, see the configuration below:
# page speed
pagespeed on;
#pagespeed ProcessScriptVariables all; #top level only
pagespeed PreserveUrlRelativity on; #prevent url rewriting to full
pagespeed EnableFilters trim_urls; #prevent url rewriting to full
pagespeed Domain https://www.project.com;
pagespeed FileCachePath /var/cache/nginx/ngx_pagespeed_cache;
pagespeed FileCacheSizeKb 802400;
pagespeed FileCacheCleanIntervalMs 50000; #EDIT PROD
pagespeed FileCacheInodeLimit 500000;
pagespeed MessageBufferSize 50000;
pagespeed LRUCacheKbPerProcess 8192;
pagespeed LRUCacheByteLimit 16384;
pagespeed DisableRewriteOnNoTransform off;
pagespeed JpegQualityForSaveData 75;
pagespeed JpegRecompressionQualityForSmallScreens 90;
pagespeed JpegRecompressionQuality -1;
pagespeed ImageRecompressionQuality -1;
pagespeed XHeaderValue "Powered By ngx-pagespeed project configuration";
pagespeed FetchHttps enable;
pagespeed LoadFromFile "https://www.project.com/wp-content/" "/var/www/project/wp-content/";
#pagespeed MapOriginDomain "http://www.project.com/" "https://www.project.com/";
#pagespeed MapOriginDomain "http://localhost" "https://www.project.com/";
#pagespeed MapOriginDomain "https://localhost" "https://www.project.com/";
pagespeed MaxCombinedJsBytes 19216000;
pagespeed MaxCombinedCssBytes 19216000;
pagespeed MaxSegmentLength 25000000;
pagespeed ImageInlineMaxBytes 5;
pagespeed CssImageInlineMaxBytes 500000000;
pagespeed ImageResolutionLimitBytes 128000000; # 4000x8000
#pagespeed ImageMaxRewritesAtOnce 10; #http block
#pagespeed RewriteLevel PassThrough; #to disable default corefilters
pagespeed RewriteLevel CoreFilters;
pagespeed PermitIdsForCssCombining font*; # see https://github.com/pagespeed/mod_pagespeed/issues/1384
pagespeed PermitIdsForCssCombining ver*;
pagespeed PermitIdsForCssCombining gmw*;
pagespeed PermitIdsForCssCombining mashsb*;
pagespeed PermitIdsForCssCombining rs*;
pagespeed PermitIdsForCssCombining chosen*;
pagespeed PermitIdsForCssCombining contact*;
pagespeed PermitIdsForCssCombining redux*;
pagespeed PermitIdsForCssCombining js_composer*;
pagespeed PermitIdsForCssCombining footer*;
pagespeed PermitIdsForCssCombining woocommerce*;
pagespeed PermitIdsForCssCombining wc*;
pagespeed PermitIdsForCssCombining dashicons*;
pagespeed PermitIdsForCssCombining blade*;
# pagespeed EnableFilters defer_javascript; but as js_deferer injected script goes 404 on /pagespeed_static/, more test to do
pagespeed EnableFilters insert_dns_prefetch;
# do below https://modpagespeed.com/doc/config_filters if commented
#pagespeed EnableFilters add_head;
pagespeed EnableFilters combine_css;
#pagespeed DisableFilters combine_javascript;
#pagespeed EnableFilters convert_meta_tags;
pagespeed EnableFilters extend_cache;
#pagespeed EnableFilters fallback_rewrite_css_urls;
#pagespeed EnableFilters inline_css;
#pagespeed EnableFilters inline_import_to_link;
#pagespeed DisableFilters inline_javascript;
#pagespeed EnableFilters rewrite_css;
#pagespeed DisableFilters rewrite_javascript;
#pagespeed EnableFilters rewrite_style_attributes_with_url;
#pagespeed EnableFilters prioritize_critical_css;
pagespeed EnableFilters recompress_images;
# covers convert_gif_to_png, convert_jpeg_to_progressive, convert_jpeg_to_webp, convert_png_to_jpeg, jpeg_subsampling, recompress_jpeg, recompress_png, recompress_webp, strip_image_color_profile, and strip_image_meta_data.
pagespeed EnableFilters rewrite_images;
pagespeed EnableFilters resize_rendered_image_dimensions;
pagespeed EnableFilters resize_images;
#pagespeed EnableFilters convert_to_webp_lossless;
#pagespeed EnableFilters convert_to_webp_animated;
pagespeed EnableFilters convert_png_to_jpeg;
pagespeed EnableFilters resize_mobile_images,inline_preview_images,insert_image_dimensions,sprite_images,lazyload_images,inline_images,responsive_images;
pagespeed LazyloadImagesBlankUrl "https://www.gstatic.com/psa/static/1.gif";
pagespeed EnableFilters collapse_whitespace;
pagespeed EnableFilters remove_comments;
pagespeed HttpCacheCompressionLevel 0; #disable for brotli to compress https://github.com/pagespeed/ngx_pagespeed/issues/1345
#insert_image_dimensions needed for https://modpagespeed.com/doc/filter-image-responsive but fail on logo
#see https://modpagespeed.com/doc/filter-image-responsive, https://modpagespeed.com/doc/filter-inline-preview-images, https://modpagespeed.com/doc/reference-image-optimize
#pagespeed admin
pagespeed Statistics on;
pagespeed StatisticsLogging on;
pagespeed LogDir /var/log/nginx/pagespeed;
#pagespeed EnableCachePurge off; #on to have individual url purge, off to get global purge
pagespeed EnableCachePurge on;
pagespeed StatisticsPath /ngx_pagespeed_statistics;
pagespeed MessagesPath /ngx_pagespeed_message;
pagespeed ConsolePath /pagespeed_console;
pagespeed AdminPath /pagespeed_admin;
##pagespeed GlobalAdminPath /pagespeed_global_admin;
##pagespeed GlobalStatisticsPath /ngx_pagespeed_global_statistics;
##pagespeed StaticAssetPrefix /var/ngx_pagespeed_static;
# see here to protect admin https://modpagespeed.com/doc/admin
# debug add ?PageSpeedFilters=%20debug to URL
pagespeed Disallow "*/wp-admin/*";
pagespeed Disallow "*/wp-login.php*";
pagespeed Disallow "*/purge/*";
pagespeed Disallow "*/paiement/*";
pagespeed Disallow "*/woocommerce-checkout-non-pci-gateway/*";
#pagespeed admin block //use allow 127.0.0.1; deny all;
#location /ngx_pagespeed_statistics { }
#location /ngx_pagespeed_global_statistics { }
#location /ngx_pagespeed_message { }
#location /pagespeed_console { }
#location ~ ^/pagespeed_admin { }
#location ~ ^/pagespeed_global_admin { }
#pagespeed interfaces
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
add_header "" "";
more_set_headers 'project-pagespeed: pagespeed data';
}
location ~ "^/pagespeed_static/" {more_set_headers 'project-pagespeed: pagespeed data'; }
location ~ "^/pagespeed_static/$" {more_set_headers 'project-pagespeed: pagespeed data'; }
location ~ "^/ngx_pagespeed_beacon$" { }
Hi @mtx-z As the doc says, LoadFromFile and MapOriginDomain can be used on the same server but for distinct domains. And the direct fectch (FetchHttps enable) need that certificates must be configured:
pagespeed SslCertDirectory directory; pagespeed SslCertFile file;
Hi @Lofesa,
Thanks a lot I missed the HTTPS certificat configuration part.
Actually, I only have one domain, but I think I can still profit from those features ?
LoadFromFile Would allow nginx/pagespeed to load files directly from filesystem instead of HTTP get them
MapOriginDomain Would allow me to give Nginx/Pagespeed better URLs than the one it find itself to load assets. (I can use it for HTTP to HTTPS, or to make nginx request assets on a specific optimised domain).
Domain Would allow me to tell nginx that it can optimize assets from other domains, in addition to mine (CDN...)
Am I right ? I'm gonna try really soon the FetchHttps option and edit my answer with resulsts.
Thanks a lot again.
Hi @mtx-z LoadFromFile permit to bypass the htpp/s fecth of resources. They had 1 issue: disk speed, but can be bypassed with a good disk-cache. This option with FechtHttps is the one I use. I had no experience w/ MapOriginDomain. And, no... Domain is not for optimize resources from other domains, or not totally. For this option, in the domain involved, pagespeed module must be installed and working. If you enable the Domain directive in a domain that is not pagespeed working, the rewrited resources can`t be served, thus you get a 404 status code in it.
2016/03/12 09:58:45 [error] 72391#0: [ngx_pagespeed 1.9.32.10-7423] Serf status 111(Connection refused) polling for 1 threaded fetches for 0.05 seconds 2016/03/12 09:58:45 [error] 72391#0: [ngx_pagespeed 1.9.32.10-7423] Serf status 111(Connection refused) polling for 1 threaded fetches for 0.05 seconds 2016/03/12 09:58:46 [error] 72391#0: [ngx_pagespeed 1.9.32.10-7423] Serf status 111(Connection refused) polling for 1 threaded fetches for 0.05 seconds 2016/03/12 09:58:46 [error] 72391#0: [ngx_pagespeed 1.9.32.10-7423] Serf status 111(Connection refused) polling for 1 threaded fetches for 0.05 seconds 2016/03/12 09:58:48 [error] 72391#0: [ngx_pagespeed 1.9.32.10-7423] Serf status 111(Connection refused) polling for 1 threaded fetches for 0.05 seconds 2016/03/12 09:58:48 [error] 72391#0: [ngx_pagespeed 1.9.32.10-7423] Serf status 111(Connection refused) polling for 1 threaded fetches for 0.05 seconds 2016/03/12 09:58:50 [error] 72391#0: [ngx_pagespeed 1.9.32.10-7423] Serf status 111(Connection refused) polling for 1 threaded fetches for 0.05 seconds 2016/03/12 09:58:50 [error] 72391#0: [ngx_pagespeed 1.9.32.10-7423] Serf status 111(Connection refused) polling for 1 threaded fetches for 0.05 seconds
nginx 1.6.2 debian 8 nginx+php5-fpm help plz
pagespeed On; pagespeed FileCachePath /var/cache/ngx_pagespeed; pagespeed FileCacheSizeKb 102400; pagespeed FileCacheCleanIntervalMs 3600000; pagespeed FileCacheInodeLimit 500000; pagespeed MapOriginDomain origin_to_fetch_from origin_specified_in_html [host_header]; pagespeed EnableFilters combine_css,combine_javascript,inline_javascript,inline_css; pagespeed EnableFilters remove_quotes,remove_comments; pagespeed EnableFilters rewrite_javascript,rewrite_css,rewrite_images; pagespeed EnableFilters collapse_whitespace,extend_cache,insert_img_dimensions; pagespeed EnableFilters recompress_images; pagespeed MemcachedServers "localhost:11211";