日期:2014-05-16  浏览次数:20868 次

求帮助!apache启动报错:关于性能调优资源限制相关的问题
启动apache时在error.log报错,如下:

Child 11750 returned a Fatal error... Apache is exiting!
[Wed Dec 11 17:18:10 2013] [alert] (11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread
[Wed Dec 11 17:18:10 2013] [alert] (11)Resource temporarily unavailable: setuid: unable to change to uid: 48


我使用的是work模式,参数设置如下:

ServerLimit          50
ThreadLimit          60
StartServers         50
MaxClients         3000
MinSpareThreads     600
MaxSpareThreads    3000
ThreadsPerChild      60


我的用户限制设置如下:

*               soft    core            unlimited
*               hard    core            unlimited

root            soft    nofile          65536
root            hard    nofile          65536
apache          soft    nofile          65536
apache          hard    nofile          65536
tomcat          soft    nofile          65536
tomcat          hard    nofile          65536



请问,报这个错误是哪里设置错误了?Child 竟有11750个?
请大拿帮我看看~~~

------解决方案--------------------
<IfModule worker.c>
ServerLimit 50
StartServers 10
MaxClients 2500
MinSpareThreads 25
MaxSpareThreads 600 
ThreadsPerChild 50
MaxRequestsPerChild 10000
</IfModule>
试试这样