# Upstream configuration is changed？The keyword (weight/max fail/fail timeout) is not supported?

**URL:** <https://www.ruby-forum.com/t/upstream-configuration-is-changed-the-keyword-weight-max-fail-fail-timeout-is-not-supported/211449>\
**Category:** NGINX\
**Created:** [September 4, 2011, 5:52pm UTC](https://www.ruby-forum.com/t/upstream-configuration-is-changed-the-keyword-weight-max-fail-fail-timeout-is-not-supported/211449 "2011-09-04T17:52:18Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [September 4, 2011, 5:52pm UTC](https://www.ruby-forum.com/t/upstream-configuration-is-changed-the-keyword-weight-max-fail-fail-timeout-is-not-supported/211449/1 "2011-09-04T17:52:18Z")

</div>

Hi All：

I met a configuation issue. the configuration is as following:（NGINX is  
V0.7.68) and upstream is enabled when compiled.  
I also test it in V1.0.5, the issue happens again.

* * *

```
            server {
                    listen 80;
                    server_name aaa.com;
                    server_name 192.168.2.140;
                    location / {
                            proxy_pass http://haha;
                            proxy_redirect off;
                            proxy_buffering off;
                            proxy_set_header Host $host;
                            proxy_set_header X-Real-IP 

```

## $remote\_addr; proxy\_set\_header X-Forwarded-For $proxy\_add\_x\_forwarded\_for; client\_max\_body\_size 1000m; client\_body\_buffer\_size 256k; proxy\_connect\_timeout 600; proxy\_temp\_file\_write\_size 64k; } } upstream haha { server 1.1.1.2 max\_fails=3 fail\_timeout=30s; \<---------max\_fails/fail\_timeouts/weight is not support ? server 1.1.1.1 weight=10; }

When I run nginx, the error message print out as following:  
./nginx

Root# /etc/init.d/nginx restart  
[emerg]: invalid parameter “max\_fails=3” in  
/var/log/nginx/conf/nginx.conf:19  
~  
~  
~  
~

---

<div class="post-metadata">

**Author:** ![Geoge.Q](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e9c0ed/32.png) [@Geoge.Q](https://www.ruby-forum.com/u/Geoge.Q)\
**Post date:** [September 4, 2011, 7:18pm UTC](https://www.ruby-forum.com/t/upstream-configuration-is-changed-the-keyword-weight-max-fail-fail-timeout-is-not-supported/211449/2 "2011-09-04T19:18:10Z")

</div>

Hello!

On Sun, Sep 04, 2011 at 11:51:31PM +0800, Geoge.Q wrote:

> ```
> server_name 192.168.2.140;
> proxy_connect_timeout 600;
> 
> ```
> 
> When I run nginx, the error message print out as following:  
> ./nginx
> 
> Root# /etc/init.d/nginx restart  
> [emerg]: invalid parameter “max\_fails=3” in  
> /var/log/nginx/conf/nginx.conf:19

The problem is that you’ve tried to define upstream after it was  
already implicitly created by proxy\_pass directive. Move upstream  
definition before it’s first use.

Maxim D.

---

<div class="post-metadata">

**Author:** ![Geoge.Q](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/e9c0ed/32.png) [@Geoge.Q](https://www.ruby-forum.com/u/Geoge.Q)\
**Post date:** [September 5, 2011, 2:36am UTC](https://www.ruby-forum.com/t/upstream-configuration-is-changed-the-keyword-weight-max-fail-fail-timeout-is-not-supported/211449/3 "2011-09-05T02:36:11Z")

</div>

Thanks Max, it works now.

George
