请求超时-500个内部服务器错误

时间:2019-06-05 08:16:13

标签: php server cakephp-3.0

我正在使用cakephp3.0。我的功能之一需要更多时间才能运行。当我运行该功能时,它显示“ 500 internal error”,“此请求处理时间太长,服务器已将其超时。如果不应超时,请联系该网站的管理员以增加“连接超时” '。” 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>

我们联系了服务器人员,他们告诉thay将最大执行时间增加到900。但是现在仍然可以在2分钟后显示500页。 现在服务器人员要求从开发方面解决此问题。

我在stackoverflow中经历了很多问题。但是我没有解决方案。

预先感谢

1 个答案:

答案 0 :(得分:0)

经过大量的研究,我找到了适用于Litespeed的解决方案。

.htaccess中添加

RewriteRule .* - [E=noabort:1]
RewriteRule .* - [E=noconntimeout:1]

Litespeed Doc

相关问题