PHP调用存储过程超时解决方法
最近工作中遇到一个头疼的问题:php中调用一个存储过程(要复制N多数据的.),由于此过程执行时间很长.导致php总是超时错误:
Service Temporarily Unavailable
The
server is temporarily unable to service your request due to maintenance downtime
or capacity problems
.
Please
try
again
later
.
问题折腾了好久,一直没找到原因.分别是:
php开头加上: set_time_limit(0);
不管用.
php.ini中设置timeout的时间:
session.cookie_lifetime = 0
session.gc_maxlifetime =
3440
pfpro.defaulttimeout = 3600
max_execution_time =
3600
max_input_time = 3600 ;
还是不管用.
设置mysql的配置文件my.ini:
connect_timeout=3600
wait_timeout=2880000
interactive_timeout
= 2880000
max_allowed_packet = 10M
还是还是不管用.
Apache中设置httpd.conf 超时:
#Timeout:
Sec.
Timeout 360000
#KeepAlive: Off | On
KeepAlive
On
#MaxKeepAliveRequests:
MaxKeepAliveRequests
0
#KeepAliveTimeout:
KeepAliveTimeout 600
继续不管用.晕死了...
今天继续找原因.哈哈哈哈.竟然在C:\Program
Files\Zend\ZendServer\etc\ZendEnablerConf.xml
中找到一个timeout属性.<Timeouts ConnectionTimeout='60' requestTimeout='120'
/>
难道是这个原因??120改成1200
.测试....成功!!!!
反正以上设置我不知道是否必须.反正这个设置必须的.呵呵呵.写在这里备忘,希望对找到这的人也有帮助
相关文档:
岗位职责
1、协助系统架构设计师进行系统架构设计工作;
2、承担Web应用核心模块的设计/实现工作;
3、承担主要开发工作,对代码质量及进度负责;
4、进行关键技术验证以及技术选型工作;
5、和产品经理沟通并确定产品开发需求;
岗位要求
1、具有互联网领域相关项目开发工作经验,对互联网业务以及技术有相 ......
PHP中的MYSQL常用函数总结
1、mysql_connect()-建立数据库连接
格式:
resource mysql_connect([string hostname [:port] [:/path/to/socket] [, string username] [, string password]])
例:
$conn = @mysql_connect("localhost", "username", "password") or dir( ......
原帖地址:http://www.phpma.com/english/20071215/640.html
Description
array explode
( string separator, string string [, int limit])phpma.com
Returns an array of strings, each of which is a substring of string
formed by splitting it on boundaries formed by the string separator
. If limit
is ......
php特殊字符过滤
1、过滤标签(HTML):strip_tags()
例如:
<?php
$text = '<?php ?><p>Test paragraph.</p><!-- Comment -
-> <a href=http://topic.csdn.net/u/20090311/09/"#fragment">Other text</a>';
echo strip_tags($text);
echo "\n";
// 允许使用<p>和< ......