5

On my nginx server, I can't login to my wordpress site. The error log mentions " No space left on device".

2014/09/26 02:02:05 [crit] 1197#0: *32 open() "/usr/local/nginx/client_body_temp/0030999742" failed (28: No space left on device)

There is space but I found that my inode usage was 100%

I have tracked down the ridiculous amount of files to /usr/local/nginx/client_body_temp where there are too many files to count.

So my question is: what is this directory for, and can I delete these files?

2
  • Did you turn on client_body_in_file_only directive? Maybe those file was caused by that.
    – masegaloeh
    Sep 26, 2014 at 3:08
  • I didn't turn it on but it's on. Reading up on nginx.org/en/docs/http/… makes me think it's ok to delete them since it's optional to save them.
    – Adripants
    Sep 26, 2014 at 3:21

1 Answer 1

10

what is this directory (/usr/local/nginx/client_body_temp/) for?

The directory was used to save buffered temporary file from client request body. Normally the temporary file inside the directory was used to buffer request body that larger than client_body_buffer_size. And normally the file was removed after nginx has finished process the request.

Other use of that directory is to debug client request body. When you set client_body_in_file_only on;, nginx will save the body to those directory. But, in this case nginx won't remove them. You can use client_body_in_file_only clean; for clean the temporal files or disable it with client_body_in_file_only off;

and can I delete these files?

Yes, you can safely remove those files.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .