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">&lt;<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>&gt;</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>
&gt; Thanks Dounin,<br>
&gt;<br>
&gt; actually, both 10.10.1.12 and 10.10.1.13 received the POST items with 1.php<br>
&gt; (so repeat ran the script) ,<br>
<br>
</div>Most likely it&#39;s failed to respond in time, and that&#39;s why nginx<br>
retried request.  Don&#39;t hesitate to look into error_log, it should<br>
has details.<br>
<div class="im"><br>
&gt; 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>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 2011/6/15 Maxim Dounin &lt;<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>&gt;<br>
&gt;<br>
&gt; &gt; Hello!<br>
&gt; &gt;<br>
&gt; &gt; On Wed, Jun 15, 2011 at 02:38:08PM +0800, MaLi wrote:<br>
&gt; &gt;<br>
&gt; &gt; &gt; hi, everyone,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;  nginx version is 0.8.53,<br>
&gt; &gt; &gt; configure (http definition)  is :<br>
&gt; &gt; &gt; ====================================<br>
&gt; &gt; &gt; http{<br>
&gt; &gt; &gt;     upstream my_loads {<br>
&gt; &gt; &gt;         server 10.10.1.12;<br>
&gt; &gt; &gt;         server 10.10.1.13;<br>
&gt; &gt; &gt;     }<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;     log_format combined_addsvr &#39;$remote_addr - $remote_user [$time_local]<br>
&gt; &gt;  &#39;<br>
&gt; &gt; &gt;                         &#39;&quot;$request&quot; $status $body_bytes_sent &#39;<br>
&gt; &gt; &gt;                         &#39;&quot;$http_referer&quot; &quot;$http_user_agent&quot;<br>
&gt; &gt; $upstream_addr<br>
&gt; &gt; &gt; $upstream_cache_status &#39;;<br>
&gt; &gt; &gt;     access_log logs/access.log combined_addsvr;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;     server {<br>
&gt; &gt; &gt;         listen 80;<br>
&gt; &gt; &gt;         server_name <a href="http://mytest.com" target="_blank">mytest.com</a>;<br>
&gt; &gt; &gt;         client_max_body_size 100m;<br>
&gt; &gt; &gt;         proxy_buffering off;<br>
&gt; &gt; &gt;         proxy_read_timeout 120;<br>
&gt; &gt; &gt;         proxy_send_timeout 120;<br>
&gt; &gt; &gt;         client_body_timeout 120;<br>
&gt; &gt; &gt;         send_timeout  120;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt;         location / {<br>
&gt; &gt; &gt;             proxy_pass <a href="http://my_loads/" target="_blank">http://my_loads/</a>;<br>
&gt; &gt; &gt;             proxy_set_header Host $host;<br>
&gt; &gt; &gt;             proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>
&gt; &gt; &gt;         }<br>
&gt; &gt; &gt;     }<br>
&gt; &gt; &gt; ===========================================<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; there is a strange line in log file: (sorry to use xxx replace of true<br>
&gt; &gt; url)<br>
&gt; &gt; &gt; 192.168.1.1 - - [14/Jun/2011:20:53:24 +0800]  &quot;POST /1.php HTTP/1.1&quot; 200<br>
&gt; &gt; &gt; 3729558 &quot;<a href="http://mytest.com/xxx" target="_blank">http://mytest.com/xxx</a>&quot; &quot;Mozilla/4.0 (compatible; MSIE 7.0;)&quot;<br>
&gt; &gt; &gt; <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>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; when nginx deals with 1.php, it sends  POST to  all upstream servers!<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; the next is normal log:<br>
&gt; &gt; &gt; 192.168.1.1 - - [14/Jun/2011:20:53:44 +0800]  &quot;POST /1.php HTTP/1.1&quot; 302<br>
&gt; &gt; 2 &quot;<br>
&gt; &gt; &gt; <a href="http://mytest.com/xxx" target="_blank">http://mytest.com/xxx</a>&quot; &quot;Mozilla/4.0 (compatible; MSIE 7.0;)&quot;<br>
&gt; &gt; <a href="http://10.10.1.12:80" target="_blank">10.10.1.12:80</a> -<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Could anyone tell me if it is  a bug or just any configure improperly?<br>
&gt; &gt; &gt; thanks.<br>
&gt; &gt;<br>
&gt; &gt; nginx will retry request on next upstream server if first one<br>
&gt; &gt; failed, see here:<br>
&gt; &gt;<br>
&gt; &gt; <a href="http://wiki.nginx.org/HttpProxyModule#proxy_next_upstream" target="_blank">http://wiki.nginx.org/HttpProxyModule#proxy_next_upstream</a><br>
&gt; &gt;<br>
&gt; &gt; Maxim Dounin<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; nginx mailing list<br>
&gt; &gt; <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
&gt; &gt; <a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
&gt; &gt;<br>
<br>
&gt; _______________________________________________<br>
&gt; nginx mailing list<br>
&gt; <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
&gt; <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>