You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Apache父进程异常退出及SSL会话缓存配置无效问题求助

Apache SSL会话缓存警告及异常关闭问题处理

错误日志内容

[Fri Oct 27 16:37:12.693972 2023] [mpm_winnt:crit] [pid 3704:tid 680] AH02538: Child: Parent process exited abruptly. Child process is ending
[Fri Oct 27 16:37:14.696271 2023] [mpm_winnt:notice] [pid 3704:tid 680] AH00364: Child: All worker threads have exited.
[Fri Oct 27 16:37:21.659834 2023] [core:warn] [pid 10588:tid 664] AH00098: pid file D:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
[Fri Oct 27 16:37:21.664832 2023] [ssl:warn] [pid 10588:tid 664] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Oct 27 16:37:21.731866 2023] [mpm_winnt:notice] [pid 10588:tid 664] AH00455: Apache/2.4.39 (Win64) OpenSSL/1.1.1c PHP/7.2.19 configured -- resuming normal operations
[Fri Oct 27 16:37:21.731866 2023] [mpm_winnt:notice] [pid 10588:tid 664] AH00456: Apache Lounge VC15 Server built: May 29 2019 11:22:50
[Fri Oct 27 16:37:21.731866 2023] [core:notice] [pid 10588:tid 664] AH00094: Command line: 'd:\\xampp\\apache\\bin\\httpd.exe -d D:/xampp/apache'
[Fri Oct 27 16:37:21.738807 2023] [mpm_winnt:notice] [pid 10588:tid 664] AH00418: Parent: Created child process 9408
[Fri Oct 27 16:37:22.772445 2023] [ssl:warn] [pid 9408:tid 684] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache]
[Fri Oct 27 16:37:22.843425 2023] [mpm_winnt:notice] [pid 9408:tid 684] AH00354: Child: Starting 150 worker threads.

问题描述

请问有人知道如何处理上述错误吗?

我尝试过相关的会话缓存配置方案,但仍然无效,相同的错误日志依旧出现。

我已在httpd-ssl.conf中尝试了以下配置:

#   Inter-Process Session Cache:
#   Configure the SSL Session Cache: First the mechanism 
#   to use and second the expiring timeout (in seconds).
#SSLSessionCache "shmcb:/xampp/apache/logs/ssl_scache(512000)"
#SSLSessionCache "shmcb:logs/ssl_scache(512000)"
#SSLSessionCache "shmcb:${SRVROOT}/logs/ssl_scache(512000)"
SSLSessionCache "shmcb:D:/xampp/apache/logs/ssl_scache(512000)"
SSLSessionCacheTimeout  300

解决步骤

1. 确认SSL配置文件已被加载

检查Apache主配置文件httpd.conf,确保存在未被注释的httpd-ssl.conf加载指令,示例:

Include conf/extra/httpd-ssl.conf

如果路径与实际不符,调整为绝对路径:

Include "D:/xampp/apache/conf/extra/httpd-ssl.conf"

2. 修复异常关闭遗留问题

日志中AH00098提示Apache之前异常关闭,按以下步骤处理:

  • 完全停止XAMPP中的Apache服务
  • 删除D:/xampp/apache/logs/httpd.pid文件
  • 重启Apache服务

3. 检查日志目录权限

确保Apache进程对D:/xampp/apache/logs/目录有读写权限:

  • 右键该目录→「属性」→「安全」
  • 为Apache运行用户(通常为SYSTEM或当前登录用户)添加「读写」权限

4. 验证配置语法正确性

打开命令提示符,切换到Apache的bin目录:

cd D:/xampp/apache/bin

执行配置检查命令:

httpd.exe -t

若显示Syntax OK则配置语法无误;若有错误,根据提示修正配置。

5. 切换缓存机制

如果shmcb机制在Windows环境下仍有问题,尝试改用dbm缓存:

SSLSessionCache "dbm:D:/xampp/apache/logs/ssl_scache"
SSLSessionCacheTimeout 300

注:使用dbm时无需添加括号和大小参数,Apache会自动生成对应缓存文件。

内容的提问来源于stack exchange,提问作者RTLEDev

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.07 12:23:23