andrewbrg opened a new issue #1686: URL: https://github.com/apache/incubator-pagespeed-ngx/issues/1686
We have been using pagespeed with varying levels of success, overall it works great until it breaks. The application is using two (2) nginx/pagespeed proxies configured with a shared Redis cache in front of the main application nginx web servers. Everything is running in Docker. What I noticed is that the utilization of Redis cache keeps growing and growing until it maxes out the cache (which was set to 1GB). Whether this is related to the redis behavior or not, it seems that we start seeing random 404s being returned on some re-written images. The images which return a 404 are at random (it seems) however the same 404s persist after multiple page reloads. The 404 image files are re-written (like all other resources) to something like: 3Ab38202a868b1020cae856e23fc2caa191b79f5c959,qw=265,ah=265.pagespeed.ic.SJOX1Ol1WO.webp (for example), however some of these persist with a 404. Flushing the entire pagespeed cache does not resolve this. It is also worth noting that flushing the cache never seems to reduce the size of the redis cache, it just keeps growing over time. Flushing the specific URL of the 404 image also does not seem to help. Can anyone help with this? I have tried moving from redis to memcached (same system exactly) to see if this works better, but would really like to understand what is wrong here. This is the pagespeed nginx config: `###################################### # Update these values per brand upstream application_server { server example-app:8090; keepalive 30; } ###################################### include inc/cloudflare.conf; pagespeed MessageBufferSize 100000; pagespeed ProcessScriptVariables all; pagespeed CreateSharedMemoryMetadataCache "/var/www/pc/pagespeed/" 51200; server { ###################################### # Update these values per brand set $root_dir "example"; set $root_domain "example.com"; ###################################### listen 80; listen [::]:80; listen 443 ssl http2; server_name _; error_log /dev/stderr; access_log /dev/stdout main; root /var/www/$root_dir/public; ssl_certificate /etc/nginx/cert.pem; ssl_certificate_key /etc/nginx/key.pem; ssl_prefer_server_ciphers on; ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5; ssl_session_cache shared:SSL:64m; ssl_session_timeout 1h; gzip on; gzip_vary on; gzip_disable "msie6"; gzip_min_length 256; gzip_buffers 16 8k; gzip_proxied any; gzip_types text/plain text/css text/js text/xml text/javascript font/ttf font/opentype image/svg+xml application/javascript application/x-javascript application/json application/xml application/rss+xml application/ttf application/x-ttf application/x-font-otf application/font-woff application/font-woff2 application/vnd.ms-fontobject; pagespeed on; pagespeed FetchHttps disable; pagespeed AllowVaryOn "Auto"; pagespeed EnableCachePurge on; pagespeed SupportNoScriptEnabled false; pagespeed InPlaceResourceOptimization on; pagespeed LogDir "/var/www/pc/pagespeed/logs/"; pagespeed LRUCacheKbPerProcess 8192; pagespeed LRUCacheByteLimit 16384; pagespeed FileCachePath "/var/www/pc/pagespeed/"; pagespeed FileCacheSizeKb 728000; pagespeed FileCacheInodeLimit 5000000; pagespeed FileCacheCleanIntervalMs 36000; pagespeed MemcachedServers "10.1.240.5:11211,10.1.240.6:11211"; pagespeed MapOriginDomain http://127.0.0.1 https://$root_domain; pagespeed MapOriginDomain http://127.0.0.1 https://stage-00.$root_domain; pagespeed MapOriginDomain http://127.0.0.1 https://stage-01.$root_domain; pagespeed EnableFilters rewrite_css; pagespeed EnableFilters lazyload_images; pagespeed EnableFilters rewrite_javascript; pagespeed EnableFilters add_instrumentation; pagespeed EnableFilters insert_dns_prefetch; pagespeed EnableFilters flatten_css_imports; pagespeed EnableFilters collapse_whitespace; pagespeed EnableFilters insert_dns_prefetch; pagespeed EnableFilters inline_google_font_css; pagespeed EnableFilters hint_preload_subresources; pagespeed EnableFilters in_place_optimize_for_browser; pagespeed EnableFilters canonicalize_javascript_libraries; pagespeed EnableFilters rewrite_images; pagespeed EnableFilters recompress_images; pagespeed EnableFilters convert_jpeg_to_webp; pagespeed EnableFilters convert_to_webp_animated; pagespeed DisableFilters responsive_images; pagespeed DisableFilters prioritize_critical_css; pagespeed Disallow "*/admin*"; pagespeed Disallow "*/healthz"; pagespeed Disallow "*/ping.js"; pagespeed Disallow "*/ping.php"; pagespeed Disallow "*/pixel.gif"; pagespeed Disallow "*/blank.gif"; pagespeed Statistics on; pagespeed StatisticsLogging on; pagespeed StatisticsPath /ngx_pagespeed_statistics; pagespeed MessagesPath /ngx_pagespeed_message; pagespeed ConsolePath /pagespeed_console; pagespeed AdminPath /pagespeed_admin; ## Ensure requests for pagespeed optimized resources go to the pagespeed handler location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" { add_header "" ""; } location ~ "^/pagespeed_static/" { } location ~ "^/ngx_pagespeed_beacon$" { } ## PageSpeed Admin UI paths location /ngx_pagespeed_statistics { include inc/restrictions.conf; } location /ngx_pagespeed_global_statistics { include inc/restrictions.conf; } location /ngx_pagespeed_message { include inc/restrictions.conf; } location /pagespeed_console { include inc/restrictions.conf; } location ^~ /(pagespeed_global_admin|pagespeed_admin) { include inc/restrictions.conf; } location / { proxy_pass http://application_server; proxy_redirect off; proxy_http_version 1.1; proxy_set_header Host $host; proxy_set_header Connection "Keep-Alive"; proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Port $server_port; proxy_set_header X-Forwarded-Proto $scheme; } include inc/redirects.conf; }` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org