# Nginx's client\_body tmp directory deleted every so often (causing uploads to fail)

**URL:** <https://www.ruby-forum.com/t/nginxs-client-body-tmp-directory-deleted-every-so-often-causing-uploads-to-fail/130242>\
**Category:** Deployment\
**Created:** [February 26, 2008, 6:33pm UTC](https://www.ruby-forum.com/t/nginxs-client-body-tmp-directory-deleted-every-so-often-causing-uploads-to-fail/130242 "2008-02-26T18:33:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 26, 2008, 6:33pm UTC](https://www.ruby-forum.com/t/nginxs-client-body-tmp-directory-deleted-every-so-often-causing-uploads-to-fail/130242/1 "2008-02-26T18:33:12Z")

</div>

Hello all,

I am wondering if anybody else is seeing this happen. I am pretty  
stumped as to why. Basically, I when I compiled nginx, I told it to  
use the /tmp/nginx for all tmp directories (client\_body, fastcgi, and  
proxy). Now, what happens is that, every so often, /tmp/nginx/  
client\_body is removed which causes all file uploads to fail.

I am currently running 0.6.22, but this happened with 0.5.33 and up. I  
haven’t seen anything in the change logs regarding this. I am not sure  
if it is a nginx problem. Maybe rails? I don’t think it could be  
anything in my code as I have noticed this happen on my other servers  
that are running other applications. I am running rails 2.0.2 on both  
servers.

Anyway, I’m not sure if this is something that only I am experiencing  
or other people are too? Thoughts?

Regards,  
Carl

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 8, 2008, 10:20pm UTC](https://www.ruby-forum.com/t/nginxs-client-body-tmp-directory-deleted-every-so-often-causing-uploads-to-fail/130242/2 "2008-03-08T22:20:22Z")

</div>

I take it that nobody else has noticed this?  
I really have no idea… :-/

On Tue, Feb 26, 2008 at 9:32 AM, removed\_email\_address@domain.invalid \<  
removed\_email\_address@domain.invalid\> wrote:

> haven’t seen anything in the change logs regarding this. I am not sure
> 
> >

–  
EPA Rating: 3000 Lines of Code / Gallon (of coffee)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [March 14, 2008, 5:03pm UTC](https://www.ruby-forum.com/t/nginxs-client-body-tmp-directory-deleted-every-so-often-causing-uploads-to-fail/130242/3 "2008-03-14T17:03:17Z")

</div>

Is it just your OS cleaning up stuff in /tmp? Try recompiling with  
the nginx bits somewhere under /var instead - see if that fixes the  
problem

On 09/03/2008, Carl L. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > I am wondering if anybody else is seeing this happen. I am pretty  
> > servers.
> 
> –  
> EPA Rating: 3000 Lines of Code / Gallon (of coffee)
> 
> >

–  
Tony White
