如何解决偶尔出现的 Apache 500 错误?

如何解决偶尔出现的 Apache 500 错误?

我对不同的 URL 发出了 GET 和 POST 请求,HTTP 1.0 和 1.1,大多数运行 Wordpress(1),偶尔会失败并出现 500(2)。没有用户自己遇到过 500,访问者也没有报告过。但它们确实出现在日志中。大多数情况下,错误与机器人请求有关(也包括像样的机器人,包括 googlebot、bingbot)。所有看起来不是机器人的用户代理都包括Linux细绳。

我能推断出这 500 个的唯一共同点是机器人/Linux UA 连接。

我还能尝试什么来弄清楚为什么这些特定请求失败?

16Gb RAM (rarely uses up more than 3GB)
8 cores, rarely goes above 0.50
Apache 2.2.15
mod_fgcid 2.3.7
CentOS 6.4
Kernel 2.6.32

TimeOut 60
KeepAlive on
MaxKeepAliveRequests 100
KeepAliveTimeout 5

<IfModule prefork.c>
StartServers       2
MinSpareServers    2
MaxSpareServers   5
ServerLimit      120
MaxClients      120
MaxRequestsPerChild  4000
</IfModule>

Loaded Modules:
 core_module (static)
 mpm_prefork_module (static)
 http_module (static)
 so_module (static)
 auth_basic_module (shared)
 auth_digest_module (shared)
 authn_file_module (shared)
 authn_alias_module (shared)
 authn_anon_module (shared)
 authn_dbm_module (shared)
 authn_default_module (shared)
 authz_host_module (shared)
 authz_user_module (shared)
 authz_owner_module (shared)
 authz_groupfile_module (shared)
 authz_dbm_module (shared)
 authz_default_module (shared)
 include_module (shared)
 log_config_module (shared)
 env_module (shared)
 ext_filter_module (shared)
 mime_magic_module (shared)
 expires_module (shared)
 deflate_module (shared)
 headers_module (shared)
 setenvif_module (shared)
 mime_module (shared)
 autoindex_module (shared)
 vhost_alias_module (shared)
 negotiation_module (shared)
 dir_module (shared)
 actions_module (shared)
 speling_module (shared)
 alias_module (shared)
 substitute_module (shared)
 rewrite_module (shared)
 cache_module (shared)
 suexec_module (shared)
 disk_cache_module (shared)
 cgi_module (shared)
 version_module (shared)
 cloudflare_module (shared)
 sed_module (shared)
 security2_module (shared)
 unique_id_module (shared)
 fcgid_module (shared)
 evasive20_module (shared)
 php5_module (shared)
 ssl_module (shared)

1)其中一些 Wordpress 网站正在运行W3TC,其他则不然。一些虚拟主机正在运行 Magento,但它们收到的 500 请求太少,我打算将它们视为不良请求。

2)我已经设置了日志监控,当出现 500 时我会收到电子邮件。

附言:如果这个问题被转移到 Wordpress.SO 或 Webmasters.SO,我可能会删除它。我永远不会在那里得到一个像样的答案……

相关内容