nginx client_body_temp_path


Well-known member
Can someone enlighten me as to what is actually put in nginx's client_body_temp_path?

I ask as I have had my nginx server online for around 2 years so far and tonight I shut it down to upgrade nginx using the centminmod script. That failed because I ran out of inodes on my VPS, turned out there is gigabytes of files in this directory.

Aside from finding out what these files actually are, I would also like to know if it is safe to prune the directory every now and again. What effect would doing this have on the actual running of site under nginx?

Any and all help on this would be appreciated.



Well-known member
I also use centmin mod for test nginx/php-fpm web servers as well. IIRC, very early versions of centmin mod (i think v1.2.1 did) mistakenly enabled client_body_in_file_only option which generated those files.

You can remove those files and make sure nginx.conf has client_body_in_file_only on; disabled / turned off or removed

I've been using Centmin Mod v1.2.2 stable and v1.2.3 beta releases and that option is disabled now by default.



Well-known member
Excellent, thanks. I will turn that setting off and save some disk space. There were 35Gb files in client_body_temp, no wonder I ran out of inodes when I tried the upgrade! :)


Well-known member
Did a bit of a search on client_body_in_file_only, seems it now has a "clean" option as well as on and off. Just set mine to "clean" to see what happens :)