我正在尝试调试一个可能与BBPress相关的间歇性404问题。我读过其他几篇关于间歇404和BBPress的报道,但没有一篇完全适用于我的情况,所以我要问一个新问题。
我的网站主页将间歇加载404。间歇性访问问题似乎每次持续10秒到3分钟。当这种情况发生时,所有试图访问该网站的人都会停止访问(在与托管服务技术支持部门通话时确认)。在此时间窗口内,站点上的其他页面似乎已正确加载。点击刷新最终将成功地正确重新加载页面。
我正在使用查询监视器检查重写规则。以下是页面加载错误时的结果:
Request account-2/conscious-business-design-dashboard
Matched Rule [^/]+/([^/]+)/?$
Matched Query attachment=conscious-business-design-dashboard
Query String attachment=conscious-business-design-dashboard
Query Vars attachment conscious-business-design-dashboard
comments_per_page 50
name conscious-business-design-dashboard
order DESC
posts_per_page 10
update_post_meta_cache 1
update_post_term_cache 1
以下是页面正确加载时的结果:Request account-2/conscious-business-design-dashboard
Matched Rule (.?.+?)(?:/([0-9]+))?/?$
Matched Query pagename=account-2%2Fconscious-business-design-dashboard
&page=
Query String pagename=account-2%2Fconscious-business-design-dashboard
Query Vars comments_per_page 50
name conscious-business-design-dashboard
order DESC
pagename conscious-business-design-dashboard
posts_per_page 10
update_post_meta_cache 1
update_post_term_cache 1
Queried Object
Single Page: #225 (WP_Post)
以下是404期间运行的最相关查询:SELECT wp_posts.*
FROM wp_posts
WHERE 1=1
AND wp_posts.post_name = \'conscious-business-design-dashboard\'
AND wp_posts.post_type = \'attachment\'
ORDER BY wp_posts.post_date DESC
以下是页面成功加载时运行的查询:SELECT wp_posts.*
FROM wp_posts
WHERE 1=1
AND (wp_posts.ID = \'225\')
AND wp_posts.post_type = \'page\'
ORDER BY wp_posts.post_date DESC
当我查看BBPress代码时,我可以在这里确定重写规则:// Rewrite rule matches used repeatedly below
$root_rule = \'/([^/]+)/?$\';
$feed_rule = \'/([^/]+)/\' . $feed_slug . \'/?$\';
$edit_rule = \'/([^/]+)/\' . $edit_slug . \'/?$\';
$paged_rule = \'/([^/]+)/\' . $paged_slug . \'/?([0-9]{1,})/?$\';
然而,所有的slug都在数据库中正确设置,我不知道它们是如何被破坏的。我在核心代码或插件代码中都找不到查询监视器结果中列出的确切重写规则。其他信息:
该站点正在使用SSL,并启用了永久链接possibility of a CPU overload, 因为404似乎在所有用户中都是瞬时的和时间相关的。向上为每个人,然后突然短暂向下为每个人。)visiting pages in specific orders may trigger a BuddyPress rewrite rule 404, 但我相对确信,就我而言,这个问题并不取决于访问的页面顺序。(我有404错误监视器的referer日志。)对进一步的故障排除有什么建议吗?