Welcome! Log In Create A New Profile

Advanced

Re: md5 fastcgi cache collisions

Maxim Dounin
September 24, 2012 08:28PM
Hello!

On Sat, Sep 22, 2012 at 04:39:47PM -0400, Ian M. Evans wrote:

> Was looking at my error log and noticed a whole bunch of errors like this:
>
> 2012/09/22 15:52:26 [crit] 641#0: *4896016 cache file
> "/var/lib/nginx/fastcgicache/3/21/32d5a44032aadeeed2b1d027314ba213" has
> md5 collision, client: x.x.x.x, server: www.example.com, request: "GET
> /cr/denzelwashington/ HTTP/1.1", host: "www.example.com"

Is the file reported is the same in all errors?

> My fastcgi cache is setup as follows:
>
> fastcgi_cache_path /var/lib/nginx/fastcgicache levels=1:2
> keys_zone=MYCACHE:5m inactive=2h max_size=1g loader_files=1000
> loader_threshold=2000;
> map $http_cookie $no_cache { default 0; ~SESS 1; }
> fastcgi_cache_key "$scheme$request_method$host$request_uri";
> add_header X-My-Cache $upstream_cache_status;
>
> /cr is actually a php file called like this in the nginx.conf from a
> thread years ago:
>
> location ~ ^/cr(/.*$|$) {
> rewrite ^/cr(/.*$|$) /$1.php?mypath=$2 last;
> }
>
> Site's working fine...just wondering what's causing all the collisions.

Most likely it's a corrupted cache file. Looking into the cache
file should be enough to see if it's indeed corrupted.

Intresting question is to find out how the file was corrupted.
This may be either something "normal" like filesystem corruption
after power failure, or something in nginx. The later case might
need investigation.

If you just want to get rid of the messages you may try to remove
the cache file, it should fix things. Normal nginx behaviour is
to replace such currupted cache files with new responses, but it
looks like it doesn't work in your case, likely because responses
aren't cacheable.

Maxim Dounin

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

md5 fastcgi cache collisions

Ian M. Evans September 22, 2012 04:40PM

Re: md5 fastcgi cache collisions

Maxim Dounin September 24, 2012 08:28PM

Re: md5 fastcgi cache collisions

Ian Evans September 24, 2012 11:08PM

Re: md5 fastcgi cache collisions

Maxim Dounin September 25, 2012 01:02AM

Re: md5 fastcgi cache collisions

Ian Evans September 25, 2012 02:00AM

Re: md5 fastcgi cache collisions

Maxim Dounin September 25, 2012 09:18AM

Re: md5 fastcgi cache collisions

Ian Evans September 25, 2012 02:34PM

Re: md5 fastcgi cache collisions

Ian Evans September 25, 2012 02:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 69
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready