oh, I see, <br><br>Maybe the POST data is too big, then first upstream server cannot response in time. I forgot to point one fact , that is one server maybe only receive part of POST data.<br><br>thanks again, Dounin.<br>
<br><br><div class="gmail_quote">2011/6/15 Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello!<br>
<div class="im"><br>
On Wed, Jun 15, 2011 at 04:03:30PM +0800, MaLi wrote:<br>
<br>
> Thanks Dounin,<br>
><br>
> actually, both 10.10.1.12 and 10.10.1.13 received the POST items with 1.php<br>
> (so repeat ran the script) ,<br>
<br>
</div>Most likely it's failed to respond in time, and that's why nginx<br>
retried request. Don't hesitate to look into error_log, it should<br>
has details.<br>
<div class="im"><br>
> and why both servers being recorded as Upstream_addr in the log file?<br>
<br>
</div>Variable $upstream_addr should contain addresses of all upstream<br>
servers tried, this is how it works.<br>
<font color="#888888"><br>
Maxim Dounin<br>
</font><div><div></div><div class="h5"><br>
><br>
><br>
><br>
> 2011/6/15 Maxim Dounin <<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>><br>
><br>
> > Hello!<br>
> ><br>
> > On Wed, Jun 15, 2011 at 02:38:08PM +0800, MaLi wrote:<br>
> ><br>
> > > hi, everyone,<br>
> > ><br>
> > > nginx version is 0.8.53,<br>
> > > configure (http definition) is :<br>
> > > ====================================<br>
> > > http{<br>
> > > upstream my_loads {<br>
> > > server 10.10.1.12;<br>
> > > server 10.10.1.13;<br>
> > > }<br>
> > ><br>
> > > log_format combined_addsvr '$remote_addr - $remote_user [$time_local]<br>
> > '<br>
> > > '"$request" $status $body_bytes_sent '<br>
> > > '"$http_referer" "$http_user_agent"<br>
> > $upstream_addr<br>
> > > $upstream_cache_status ';<br>
> > > access_log logs/access.log combined_addsvr;<br>
> > ><br>
> > > server {<br>
> > > listen 80;<br>
> > > server_name <a href="http://mytest.com" target="_blank">mytest.com</a>;<br>
> > > client_max_body_size 100m;<br>
> > > proxy_buffering off;<br>
> > > proxy_read_timeout 120;<br>
> > > proxy_send_timeout 120;<br>
> > > client_body_timeout 120;<br>
> > > send_timeout 120;<br>
> > ><br>
> > > location / {<br>
> > > proxy_pass <a href="http://my_loads/" target="_blank">http://my_loads/</a>;<br>
> > > proxy_set_header Host $host;<br>
> > > proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>
> > > }<br>
> > > }<br>
> > > ===========================================<br>
> > ><br>
> > > there is a strange line in log file: (sorry to use xxx replace of true<br>
> > url)<br>
> > > 192.168.1.1 - - [14/Jun/2011:20:53:24 +0800] "POST /1.php HTTP/1.1" 200<br>
> > > 3729558 "<a href="http://mytest.com/xxx" target="_blank">http://mytest.com/xxx</a>" "Mozilla/4.0 (compatible; MSIE 7.0;)"<br>
> > > <a href="http://10.10.1.12:80" target="_blank">10.10.1.12:80</a>, <a href="http://10.10.1.13:80" target="_blank">10.10.1.13:80</a> -<br>
> > ><br>
> > > when nginx deals with 1.php, it sends POST to all upstream servers!<br>
> > ><br>
> > > the next is normal log:<br>
> > > 192.168.1.1 - - [14/Jun/2011:20:53:44 +0800] "POST /1.php HTTP/1.1" 302<br>
> > 2 "<br>
> > > <a href="http://mytest.com/xxx" target="_blank">http://mytest.com/xxx</a>" "Mozilla/4.0 (compatible; MSIE 7.0;)"<br>
> > <a href="http://10.10.1.12:80" target="_blank">10.10.1.12:80</a> -<br>
> > ><br>
> > > Could anyone tell me if it is a bug or just any configure improperly?<br>
> > > thanks.<br>
> ><br>
> > nginx will retry request on next upstream server if first one<br>
> > failed, see here:<br>
> ><br>
> > <a href="http://wiki.nginx.org/HttpProxyModule#proxy_next_upstream" target="_blank">http://wiki.nginx.org/HttpProxyModule#proxy_next_upstream</a><br>
> ><br>
> > Maxim Dounin<br>
> ><br>
> > _______________________________________________<br>
> > nginx mailing list<br>
> > <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
> ><br>
<br>
> _______________________________________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br>