码迷,mamicode.com
首页 > Web开发 > 详细

nginx+php-fpm 502 bad gateway

时间:2014-12-13 19:18:46      阅读:168      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   io   ar   color   使用   sp   on   

输出日志配置:

http://blog.csdn.net/wzy_1988/article/details/8486888

解决方案:

http://www.cnblogs.com/jackluo/p/3366612.html

 

有关file_get_contents引起的502解决方案:

http://www.111cn.net/phper/php-function/55873.htm

http://www.qetee.com/share/php-fpm-cpu100.html

 

 

使用自己封装的file_get_content函数代替系统自带的file_get_contents

function _file_get_content($str) { 
$ctx = stream_context_create(array(   
   http => array(   
       timeout => 10 //设置一个超时时间,单位为秒   
       )   
   )   
);   
return file_get_contents($str, 0, $ctx);   
}

 

nginx+php-fpm 502 bad gateway

标签:style   blog   http   io   ar   color   使用   sp   on   

原文地址:http://www.cnblogs.com/walter371/p/4161646.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!