[英]Request Timeout - 500 internal server error
我在 cakephp3.0 工作。 我的一个函数需要更多时间来运行。 当我运行该功能时显示“500内部错误”,“此请求处理时间过长,服务器超时。如果不应超时,请联系本网站管理员增加'连接超时'。” php ini 文件是
allow_url_fopen = On
allow_url_include = On
asp_tags = Off
display_errors = Off
enable_dl = On
file_uploads = On
max_execution_time = 900
max_input_time = -1
max_input_vars = 100000;
memory_limit = 128M
post_max_size = 700M
session.gc_maxlifetime = 43200
session.save_path = "/tmp"
upload_max_filesize = 999M;
zlib.output_compression = On
和 htaccess 文件是
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteRule ^$ webroot/ [L]
RewriteRule (.*) webroot/$1 [L]
</IfModule>
<IfModule php5_module>
php_flag asp_tags Off
php_flag display_errors Off
php_value max_execution_time 900
php_value max_input_time -1
php_value max_input_vars 1000
php_value memory_limit 128M
php_value post_max_size 700M
php_value session.gc_maxlifetime 43200
php_value session.save_path "/tmp"
php_value upload_max_filesize 250M
php_flag zlib.output_compression On
</IfModule>
我们联系了服务器人员,他们告诉他们已将最大执行时间增加到 900。但现在仍然在 2 分钟后显示 500 页。 现在服务器人员要求从开发方面解决问题。
我在stackoverflow中遇到了很多问题。 但我没有得到解决方案。
提前致谢
在研究了很多时间之后,我为 Litespeed 找到了这个解决方案。
在.htaccess
添加
RewriteRule .* - [E=noabort:1]
RewriteRule .* - [E=noconntimeout:1]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.