win2003下apache,无法访问
使用win2003 + apache2.0.59 + tomcat 5.5 + jk1.2构建了一个网站。由apache负责前端转发和处理静态资源,tomcat处理.jsp等动态页面。
现在发现每过一段时间(有时1小时,有时几小时)apache 停止响应,页面无法访问。
apache conf相关配置如下:
--
ThreadsPerChild 1500
MaxRequestsPerChild 10000
--
tomcat 相关配置如下:
--
<Connector port="8080" maxHttpHeaderSize="8192"
maxThreads="500" minSpareThreads="400" maxSpareThreads="450"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" />
--
该站点日常访问量在500-1500,并发应该没有达到上限1500。但是apache日志(error.log)显示:
--
[Mon Jan 14 13:50:20 2008] [notice] Child 8316: Process exiting because it reached MaxRequestsPerChild. Signaling the parent to restart a new child process.
[Mon Jan 14 13:50:20 2008] [notice] Parent: Received restart signal -- Restarting the server.
[Mon Jan 14 13:50:20 2008] [notice] Apache configured -- resuming normal operations
[Mon Jan 14 13:50:20 2008] [notice] Server built: Jul 27 2006 15:55:03
[Mon Jan 14 13:50:20 2008] [notice] Parent: Created child process 13756
[Mon Jan 14 13:50:20 2008] [notice] Child 13756: Child process is running
[Mon Jan 14 13:50:21 2008] [notice] Child 8316: Released the start mutex
[Mon Jan 14 13:50:21 2008] [notice] Child 13756: Acquired the start mutex.
[Mon Jan 14 13:50:21 2008] [notice] Child 13756: Starting 1500 worker threads.
[Mon Jan 14 13:50:26 2008] [notice] Child 8316: Waiting for 1500 worker threads to exit.
[Mon Jan 14 13:58:08 2008] [notice] Parent: Received shutdown signal -- Shutting down the server.
[Mon Jan 14 13:58:08 2008] [notice] Child 13756: Exit event signaled. Child process is ending.
[Mon Jan 14 13:58:09 2008] [notice] Child 13756: Released the start mutex
[Mon Jan 14 13:58:10 2008] [notice] Child 13756: Waiting for 1439 worker threads to exit.
[Mon Jan 14 13:58:10 2008] [crit] [Mon Jan 14 13:58:10 2008] file D:\\asf-build\\build-2.0.59\\server\\mpm\\winnt\\child.c, line 1078, assertion "(rv >= 0) && (rv < threads_created)" failed
[Mon Jan 14 13:58:14 2008] [notice] Parent: Child process exited successfully.
[Mon Jan 14 13:58:19 2008] [notice] Apache configured -- resuming normal operations
[Mon Jan 14 13:58:19 2008] [notice] Server built: Jul 27 2006 15:55:03
[Mon Jan 14 13:58:19 2008] [notice] Parent: Created child process 8524
[Mon Jan 14 13:58:19 2008] [notice] Child 8524: Child process is running
[Mon Jan 14 13:58:19 2008] [notice] Child 8524: Acquired the start mutex.
[Mon Jan 14 13:58:19 2008] [notice] Child 8524: Starting 1500 worker threads.
--
在14点50分的时候,apache的子线程退出,客户端无法访问。
58分的时候,人工重启apache,恢复正常。
现在访问量大时,这种现象经常出现,请问,这是什么原因?