Error log

Maxim Dounin mdounin at mdounin.ru
Mon Sep 10 14:44:11 UTC 2012


Hello!

On Mon, Sep 10, 2012 at 04:27:14PM +0200, Andrea Soracchi wrote:

> Hi,
> 
> but nginx should remove the file only after the upload has been completed.
> 
> Or no?

No.  File is unlink()ed once it's created, and nginx will 
work with it via an already opened file descriptor.

This way temporary file is automatically deleted once 
corresponding file descriptor is closed, even if something goes 
completely wrong (e.g. nginx is killed with signal 9).

Maxim Dounin

> 
> 
> 
> 
> 
> ----- Messaggio originale -----
> Da: "Maxim Dounin" <mdounin at mdounin.ru>
> A: nginx at nginx.org
> Inviato: Lunedì, 10 settembre 2012 16:10:54
> Oggetto: Re: Error log
> 
> Hello!
> 
> On Mon, Sep 10, 2012 at 04:04:09PM +0200, Andrea Soracchi wrote:
> 
> > Hi,
> > 
> > when I upload a file (big or small) I get this error line in error.log:
> > 
> > a client request body is buffered to a temporary file /usr/local/nginx/client_body_temp/0000000075
> > 
> > The error log marks it as warning. 
> > 
> > During the upload of a big file I expect to find the above mentioned file in the directory, but it's empty.
> > 
> > Any idea?
> 
> It should be empty, as nginx unlink()s temporary files as soon as 
> they are created (unless you've set client_body_in_file_only in 
> your config, see http://nginx.org/r/client_body_in_file_only).
> 
> Maxim Dounin
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
> 
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx



More information about the nginx mailing list