LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1336|回复: 1

apache启动不了的问题

[复制链接]
发表于 2005-6-10 16:22:17 | 显示全部楼层 |阅读模式
我的apache,如果是系统启动时启动,能够正常,但是如果系统启动后,关闭在重新启动,就出现这个问题:

[Fri Jun 10 16:13:43 2005] [alert] (11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread
[Fri Jun 10 16:13:43 2005] [alert] (11)Resource temporarily unavailable: apr_thread_create: unable to create worker thread
[Fri Jun 10 16:13:44 2005] [alert] (11)Resource temporarily unavailable: setuid: unable to change to uid: 6433
[Fri Jun 10 16:13:44 2005] [alert] Child 16695 returned a Fatal error... Apache is exiting!
[Fri Jun 10 16:13:47 2005] [warn] child process 16674 still did not exit, sending a SIGTERM
[Fri Jun 10 16:13:47 2005] [warn] child process 16676 still did not exit, sending a SIGTERM
[Fri Jun 10 16:13:49 2005] [warn] child process 16674 still did not exit, sending a SIGTERM
[Fri Jun 10 16:13:49 2005] [warn] child process 16676 still did not exit, sending a SIGTERM
[Fri Jun 10 16:13:51 2005] [warn] child process 16674 still did not exit, sending a SIGTERM
[Fri Jun 10 16:13:51 2005] [warn] child process 16676 still did not exit, sending a SIGTERM

奇怪了。我用的是worker,有改源码。但是后来我重新装一个新的,没有改源码,也仍然这样。你们碰到过这种问题吗?
 楼主| 发表于 2005-6-10 16:32:15 | 显示全部楼层
问题找出来了,我对资源进行了限制,结果就出现那个问题了:

对你的系统上所有的用户设置资源限制可以防止DoS类型攻击(denial of service attacks)
如最大进程数,内存数量等。例如,对所有用户的限制象下面这样:
编辑/etc/security/limits.conf加:

* hard core 0
* hard rss 5000
* hard nproc 20
你也必须编辑/etc/pam.d/login文件加/检查这一行的存在。

session required /lib/security/pam_limits.so

上面的命令禁止core files“core 0”,限制进程数为“nproc 50“,且限制内存使用
为5M“rss 5000”。

希望大家不要跟我一样哦!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表