我的服务器在长 PHP 请求期间返回内部服务器错误

我的服务器在长 PHP 请求期间返回内部服务器错误

我在服务器上运行较长的 PHP 请求时遇到这种情况。我将php.ini设置值配置为post_max_size32M 和memory_limit512MB

但是服务器返回此错误:

在此处输入图片描述

因此,我检查了我的 Apache 日志,只看到以下内容:

[Wed Oct 23 04:19:31.076537 2019] [mpm_prefork:notice] [pid 31374] AH00163: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 configured -- resuming normal operations
[Wed Oct 23 04:19:31.076556 2019] [core:notice] [pid 31374] AH00094: Command line: '/usr/sbin/apache2'
[Wed Oct 23 04:20:27.780880 2019] [fcgid:warn] [pid 31378] mod_fcgid: process 31412 graceful kill fail, sending SIGKILL
[Wed Oct 23 04:21:42.023245 2019] [mpm_prefork:notice] [pid 31374] AH00169: caught SIGTERM, shutting down
[Wed Oct 23 04:21:42.096780 2019] [suexec:notice] [pid 32144] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Oct 23 04:21:42.118983 2019] [mpm_prefork:notice] [pid 32159] AH00163: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 configured -- resuming normal operations
[Wed Oct 23 04:21:42.119006 2019] [core:notice] [pid 32159] AH00094: Command line: '/usr/sbin/apache2'
[Wed Oct 23 04:23:03.477187 2019] [fcgid:warn] [pid 32162] mod_fcgid: process 32179 graceful kill fail, sending SIGKILL
[Wed Oct 23 04:23:34.223806 2019] [mpm_prefork:notice] [pid 32159] AH00169: caught SIGTERM, shutting down
[Wed Oct 23 04:23:34.369164 2019] [suexec:notice] [pid 32257] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Oct 23 04:23:34.393331 2019] [mpm_prefork:notice] [pid 32270] AH00163: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 configured -- resuming normal operations
[Wed Oct 23 04:23:34.393349 2019] [core:notice] [pid 32270] AH00094: Command line: '/usr/sbin/apache2'
[Wed Oct 23 04:24:25.196653 2019] [fcgid:warn] [pid 32274] mod_fcgid: process 32292 graceful kill fail, sending SIGKILL
[Wed Oct 23 04:27:18.281931 2019] [fcgid:warn] [pid 32274] mod_fcgid: process 490 graceful kill fail, sending SIGKILL
[Wed Oct 23 04:31:25.756624 2019] [mpm_prefork:notice] [pid 32270] AH00169: caught SIGTERM, shutting down
[Wed Oct 23 04:31:25.896784 2019] [suexec:notice] [pid 1429] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Wed Oct 23 04:31:25.918894 2019] [mpm_prefork:notice] [pid 1448] AH00163: Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1 configured -- resuming normal operations
[Wed Oct 23 04:31:25.918914 2019] [core:notice] [pid 1448] AH00094: Command line: '/usr/sbin/apache2'
[Wed Oct 23 04:32:38.260141 2019] [fcgid:warn] [pid 1452] mod_fcgid: process 1474 graceful kill fail, sending SIGKILL
[Wed Oct 23 04:38:42.999506 2019] [fcgid:warn] [pid 1452] mod_fcgid: process 26667 graceful kill fail, sending SIGKILL

我在另一台具有相同配置的服务器上运行相同的站点并且运行良好,但在此测试服务器中我收到了上述错误。

我还能做什么来获取有关此错误的更多信息(因为 Apache 日志没有返回足够的信息)。

以下是一些其他详细信息:

我正在使用 CodeIgniter 框架运行一个连接到 MySQL 数据库的单个 PHP 脚本(大约一千个条目 - 例如,直接通过 Workbench 运行效果很好),但这不是问题的一部分因为我唯一需要知道的是如何强制我的服务器返回有关内部服务器错误的更多信息。

答案1

Apache 日志无法帮助解决问题。您需要检查PHP 日志,即通过 PHP 本身启用。

相关内容