WordPress门户页加载卡顿:admin-ajax.php报HTTP/2 500错误求助
WordPress门户页预加载卡顿与admin-ajax.php 500错误分析
核心结论
这个admin-ajax.php的500内部服务器错误直接导致页面卡在预加载阶段——门户页的内容渲染依赖该AJAX请求返回的数据,请求失败后页面无法完成初始化流程。
错误诱因
500错误属于服务器端故障,针对该请求的常见触发原因包括:
- 主题或自定义插件的AJAX处理代码存在语法错误、未定义函数或逻辑bug
- PHP内存配额不足,AJAX请求执行时超出限制导致脚本崩溃
admin-ajax.php文件或相关目录权限配置错误,服务器无法正常执行脚本- 请求涉及的数据库操作失败(比如连接中断、查询语句错误)
- 缓存插件/CDN缓存了无效的AJAX响应,导致请求无法正常路由
- 服务器PHP版本与主题/插件的代码不兼容
控制台错误信息
POST https://####/wp-admin/admin-ajax.php[HTTP/2 500 Internal Server Error 5675ms]
错误详情
Status: 500 Internal Server Error Version: HTTP/2 Transferred: 726 B (241 B size) Referrer Policy: strict-origin-when-cross-origin
响应头
access-control-allow-credentials: true access-control-allow-origin: https://#### cache-control: no-cache, must-revalidate, max-age=0 content-type: text/html; charset=UTF-8 date: Sun, 30 Oct 2022 08:45:32 GMT expires: Wed, 11 Jan 1984 05:00:00 GMT referrer-policy: strict-origin-when-cross-origin server: Apache x-content-type-options: nosniff X-Firefox-Spdy: h2 x-frame-options: SAMEORIGIN x-robots-tag: noindex
请求头
Accept: application/json, text/javascript, */*; q=0.01 Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.5 Connection: keep-alive Content-Length: 1242 Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Cookie: wordpress_sec_43463c74c2bcdfa8f63c308437d1e9a2=########.com%7C1668185768%7C3RDSuJIwsueKkV0XMKCFD8aYWn14tchxzW5ygy5ZT2V%7Cc98e394e223dbf6e592589722ee40693641c42b27df660dc8bf0d307d26d1bb8; wordpress_logged_in_43463c74c2bcdfa8f63c308437d1e9a2=rreis%40ejme.com%7C1668185768%7C3RDSuJIwsueKkV0XMKCFD8aYWn14tchxzW5ygy5ZT2V%7Caa83aa2070723dd4047efdf67a1d3681a827359dfac09e97fe3ebf5156f6c343; wp-settings-175=editor%3Dtinymce; wp-settings-time-175=1666975646; wpc_key=BcD%26y9QHSMt%21mygJDcMm; PHPSESSID=ac2505ebc1aa49f5748064cb9bbfc233; sc_is_visitor_unique=rx11212407.1667119532.8D619E70C6CF4F2F03D9DB342E78DFB3.2.2.2.2.2.2.2.1.1 Host: www.####.co.uk Origin: https://www.####.co.uk Referer: https://www.####.co.uk/portal/portal-hub/ Sec-Fetch-Dest: empty Sec-Fetch-Mode: cors Sec-Fetch-Site: same-origin TE: trailers User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:106.0) Gecko/20100101 Firefox/106.0 X-Requested-With: XMLHttpRequest
内容的提问来源于stack exchange,提问作者eagle8
相关产品推荐
相关产品推荐

