# A lot of crit error in logs

**URL:** <https://www.ruby-forum.com/t/a-lot-of-crit-error-in-logs/187075>\
**Category:** NGINX\
**Created:** [April 16, 2010, 4:28pm UTC](https://www.ruby-forum.com/t/a-lot-of-crit-error-in-logs/187075 "2010-04-16T16:28:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![solarisik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@solarisik](https://www.ruby-forum.com/u/solarisik)\
**Post date:** [April 16, 2010, 4:28pm UTC](https://www.ruby-forum.com/t/a-lot-of-crit-error-in-logs/187075/1 "2010-04-16T16:28:55Z")

</div>

I use nginx for reverse proxy on front of apache2. I get a lot of crit  
messages in logs like this.

2010/04/16 17:20:32 1730#0: \*468039 rename() “/webhost/tmp/0004372283”  
to “/webhost/tmp/xxxxxxx/” failed (20: Not a directory) while reading  
upstream, client: xxxxxxxxxxx, server: _._, request: “GET  
/xxxxxxxx/?&manset\_id=&baslangic=2510 HTTP/1.1”, upstream:  
“[http://xxxxxxxxxxx:8080/xxxxxxxxxxxx/?&manset\_id=&baslangic=2510](http://xxxxxxxxxxx:8080/xxxxxxxxxxxx/?&manset_id=&baslangic=2510)”,  
host: “[xxxxxxxxxx.com](http://xxxxxxxxxx.com)”

here is my config.

user www-data;  
worker\_processes 4;

error\_log /logs/nginx/error.log;  
pid /var/run/nginx.pid;

events {  
worker\_connections 1024;  
}

http {  
include /etc/nginx/mime.types;  
default\_type application/octet-stream;

```
log_format main '$remote_addr - $remote_user [$time_local] 

```

$request ’  
'“$status”  
$body\_bytes\_sent “$http\_referer” ’  
‘“$http\_user\_agent”  
“$http\_x\_forwarded\_for”’;

```
access_log /logs/nginx/access.log main;

tcp_nodelay on;

```

## Size Limits

client\_body\_buffer\_size 128K;  
client\_header\_buffer\_size 128K;  
client\_max\_body\_size 1M;  
large\_client\_header\_buffers 1 1k;

## Timeouts

client\_body\_timeout 60;  
client\_header\_timeout 60;  
expires 0;  
keepalive\_timeout 60 60;  
send\_timeout 60;

## General Options

ignore\_invalid\_headers on;

# keepalive\_requests 100;

limit\_zone gulag $binary\_remote\_addr 5m;  
recursive\_error\_pages on;  
sendfile on;  
server\_name\_in\_redirect off;  
server\_tokens off;

gzip on;

# gzip\_static on;

gzip\_buffers 16 8k;  
gzip\_comp\_level 6 ;  
gzip\_http\_version 1.0;  
gzip\_proxied any;  
gzip\_min\_length 0;  
gzip\_types application/x-shockwave-flash text/plain text/html  
text/css application/javascript application/x-javascript text/xml  
application/xml application/xml+rss text/javascript;  
gzip\_vary on;

```
upstream xxxxxxxxxxx {

    server xxxxxxxxxxxxxxxxxx:8080;

}

```

server {

```
            server_name *.*;
            root /webhost/tmp/;

```

location /  
{  
proxy\_pass [http://xxxxxxx](http://xxxxxxx);

}

}

proxy\_store on;  
proxy\_redirect off;  
proxy\_temp\_path /webhost/tmp;  
proxy\_store\_access user:rw group:rw all:r; # set cache access  
permissions  
proxy\_set\_header Host $host; # Forward IP headers to Apache  
proxy\_set\_header X-Real-IP $remote\_addr; # Forward IP headers to Apache  
proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for; # Forward  
IP headers to Apache

```
include /etc/nginx/conf.d/*.conf;

```

# include /etc/nginx/sites-enabled/\*;

}

Posted at Nginx Forum:

> **[a lot of crit error in logs](https://forum.nginx.org/read.php?2,75757,75757#msg-75757)**
>
> I use nginx for reverse proxy on front of apache2. I get a lot of crit messages in logs like this. 2010/04/16 17:20:32 \[crit\] 1730#0: \*468039 rename() "/webhost/tmp/0004372283" to "/webhost/tmp/xxxxxxx/" failed (20: Not a...

---

<div class="post-metadata">

**Author:** ![solarisik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@solarisik](https://www.ruby-forum.com/u/solarisik)\
**Post date:** [April 16, 2010, 7:23pm UTC](https://www.ruby-forum.com/t/a-lot-of-crit-error-in-logs/187075/2 "2010-04-16T19:23:26Z")

</div>

Hi,

That error is because /webhost/tmp/0004372283 is a file but  
/webhost/tmp/xxxxxxx/ is a directory which is being tried to rename.

I wonder what is trying to rename a file to directory ?

Posted at Nginx Forum:

> **[Re: a lot of crit error in logs](https://forum.nginx.org/read.php?2,75757,75824#msg-75824)**
>
> I use nginx for reverse proxy on front of apache2. I get a lot of crit messages in logs like this. 2010/04/16 17:20:32 \[crit\] 1730#0: \*468039 rename() "/webhost/tmp/0004372283" to "/webhost/tmp/xxxxxxx/" failed (20: Not a...

---

<div class="post-metadata">

**Author:** ![solarisik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@solarisik](https://www.ruby-forum.com/u/solarisik)\
**Post date:** [April 17, 2010, 11:07am UTC](https://www.ruby-forum.com/t/a-lot-of-crit-error-in-logs/187075/3 "2010-04-17T11:07:33Z")

</div>

Hello!

On Fri, Apr 16, 2010 at 10:28:10AM -0400, solarisik wrote:

> I use nginx for reverse proxy on front of apache2. I get a lot of crit messages in logs like this.
> 
> 2010/04/16 17:20:32 1730#0: \*468039 rename() “/webhost/tmp/0004372283” to “/webhost/tmp/xxxxxxx/” failed (20: Not a directory) while reading upstream, client: xxxxxxxxxxx, server: _._, request: “GET /xxxxxxxx/?&manset\_id=&baslangic=2510 HTTP/1.1”, upstream: “[http://xxxxxxxxxxx:8080/xxxxxxxxxxxx/?&manset\_id=&baslangic=2510](http://xxxxxxxxxxx:8080/xxxxxxxxxxxx/?&manset_id=&baslangic=2510)”, host: “[xxxxxxxxxx.com](http://xxxxxxxxxx.com)”
> 
> here is my config.

[…]

> ```
> root /webhost/tmp/;
> 
> ```

[…]

> proxy\_store on;  
> proxy\_redirect off;  
> proxy\_temp\_path /webhost/tmp;

You are configured proxy\_store to /webhost/tmp/. And you have  
other files in this directory, at least nginx’s own proxy\_temp  
and/or other files already saved by previous proxy\_store requests  
(which is likely to cause conflicts due to your site structure).

Additionally, you are trying to save directory index accesses  
without mapping them to files via custom proxy\_store strings.  
This will not work (though will cause different error).

And, after all, you don’t use proxy\_store results at all.

Let me guess: you don’t need proxy\_store at all, right?

Maxim D.

---

<div class="post-metadata">

**Author:** ![solarisik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@solarisik](https://www.ruby-forum.com/u/solarisik)\
**Post date:** [April 19, 2010, 9:25am UTC](https://www.ruby-forum.com/t/a-lot-of-crit-error-in-logs/187075/4 "2010-04-19T09:25:10Z")

</div>

Thank you maxim

I also want to store files, I just change server conf /webhost/tmp/xxxx  
and there is no error message at all.

Posted at Nginx Forum:

> **[Re: a lot of crit error in logs](https://forum.nginx.org/read.php?2,75757,76531#msg-76531)**
>
> I use nginx for reverse proxy on front of apache2. I get a lot of crit messages in logs like this. 2010/04/16 17:20:32 \[crit\] 1730#0: \*468039 rename() "/webhost/tmp/0004372283" to "/webhost/tmp/xxxxxxx/" failed (20: Not a...

---

<div class="post-metadata">

**Author:** ![solarisik](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@solarisik](https://www.ruby-forum.com/u/solarisik)\
**Post date:** [April 19, 2010, 10:01am UTC](https://www.ruby-forum.com/t/a-lot-of-crit-error-in-logs/187075/5 "2010-04-19T10:01:29Z")

</div>

hello

early decision, my image server crit error gone but my app server error  
stil exist. I think the problem is my app server not use .html .htm like  
web page structure. /backup/tmp/0000000844 files are not appear any more  
but error in logs still exist.

Posted at Nginx Forum:

> **[Re: a lot of crit error in logs](https://forum.nginx.org/read.php?2,75757,76545#msg-76545)**
>
> I use nginx for reverse proxy on front of apache2. I get a lot of crit messages in logs like this. 2010/04/16 17:20:32 \[crit\] 1730#0: \*468039 rename() "/webhost/tmp/0004372283" to "/webhost/tmp/xxxxxxx/" failed (20: Not a...
