Patch: Prevent crit error being loggged on delete of non-existent file

Tom van der Woerdt info at
Tue Nov 19 18:28:19 UTC 2013

Steven Hartland schreef op 19/11/13 18:36:
> ----- Original Message ----- From: "Maxim Dounin" <mdounin at>
> To: <nginx-devel at>
> Sent: Tuesday, November 19, 2013 4:52 PM
> Subject: Re: Patch: Prevent crit error being loggged on delete of 
> non-existent file
>> Hello!
>> On Tue, Nov 19, 2013 at 04:43:54PM -0000, Steven Hartland wrote:
>>> Hi guys the attached patch prevents http file cache from
>>> logging a critical error when a file delete fails due to
>>> it not existing, which I'm sure was never the intention.
>> Why you think it's not an intention?  If a file doesn't exists but 
>> nginx tries to delete it - it means that nginx has wong notion of 
>> what is on disk.  It's certainly a problem which deserves logging.
> I can understand that being an issue when you tried to access
> the file from the cache, but thats not where it gets logged
> only on delete and as your deleting it why worry if its not
> there?
> In specific use case here is a manual cache purge which has occured
> deleting all files in the directory, which admittely isnt ideal,
> but appart from the critical error being logged on delete
> everything appears to be working fine.
>    Regards
>    Steve

If everything works fine but something is logged, it should not be 
considered critical, but simply a warning. Criticals and errors should 
be reserved for things nginx can't compensate for, warnings and notices 
for the rest.

Completely muting these things is not the right solution though.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3729 bytes
Desc: S/MIME-cryptografische ondertekening
URL: <>

More information about the nginx-devel mailing list