<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
<title><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></title> 
<link>http://www.jackxiang.com/index.php</link> 
<description><![CDATA[赢在IT，Playin' with IT,Focus on Killer Application,Marketing Meets Technology.]]></description> 
<language>zh-cn</language> 
<copyright><![CDATA[向东博客 专注WEB应用 构架之美 --- 构架之美，在于尽态极妍 | 应用之美，在于药到病除]]></copyright>
<item>
<link>http://www.jackxiang.com/post//</link>
<title><![CDATA[[遇到问题]解决 recv() failed (104: Connection reset by peer) while reading response header from upstream]]></title> 
<author>jack &lt;xdy108@126.com&gt;</author>
<category><![CDATA[Php/Js/Shell/Go]]></category>
<pubDate>Tue, 16 Feb 2016 08:31:51 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//</guid> 
<description>
<![CDATA[ 
	问题如下：<br/>2016/02/16 16:29:05 [error] 11925#0: *50 recv() failed (104: Connection reset by peer) while reading response header from upstream<br/><br/>解决办法：<br/>Nginx出现502 Bad Gateway 错误，<br/>查了Nginx的错误日志为：<br/>2014/08/02 16:14:31 [error] 17029#0: *17941 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 210.61.12.2, server: blog.lixiphp.com, request: “POST /api/1.0 HTTP/1.1″, upstream: “fastcgi://127.0.0.1:9000″, host: “blog.lixiphp.com”2014/08/02 16:24:52 [error] 29615#0: *3 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 58.220.197.35, server: blog.lixiphp.com, request: “GET /404 HTTP/1.1″, upstream: “fastcgi://127.0.0.1:9000″, host: “blog.lixiphp.com”<br/>不要使用php-fpm的request_terminate_timeout，最好设成request_terminate_timeout=0;<br/>vi /etc/php-fpm.d/www.conf<br/>修改为：<br/>; The timeout for serving a single request after which the worker process will<br/>; be killed. This option should be used when the ‘max_execution_time’ ini option<br/>; does not stop script execution for some reason. A value of ’0′ means ‘off’.<br/>; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)<br/>; Default Value: 0<br/>request_terminate_timeout = 0<br/>因为这个参数会直接杀掉php进程，然后重启php进程，这样前端nginx就会返回104: Connection reset by peer。这个过程是很慢，总体感觉就是网站很卡。<br/>重启 php-fpm 和 Nginx 一切正常。<br/>service nginx restart<br/>killall php-fpm<br/>php-fpm<br/>再打开就OK了。<br/><br/>来自：http://www.th7.cn/Program/php/201408/254237.shtml
]]>
</description>
</item><item>
<link>http://www.jackxiang.com/post//#blogcomment</link>
<title><![CDATA[[评论] [遇到问题]解决 recv() failed (104: Connection reset by peer) while reading response header from upstream]]></title> 
<author> &lt;user@domain.com&gt;</author>
<category><![CDATA[评论]]></category>
<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate> 
<guid>http://www.jackxiang.com/post//#blogcomment</guid> 
<description>
<![CDATA[ 
	
]]>
</description>
</item>
</channel>
</rss>