修改Apache配置文件并生效的困惑

 今天修改了Apache的连接数,如下 :

<IfModule mpm_prefork_module>
    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    ServerLimit         2048
    MaxClients         2000
    MaxRequestsPerChild   0
</IfModule>


在使用

apachectl restart


后始终不生效,最大连接数始终停留在默认的256。

 

在折腾几个小时后,偶然用

apachectl stop
apachectl start


就成功了,我那个郁闷啦!其实之前也碰到过这样的问题,但忘了,今天写在这里,以免时间长了又给忘了。

以下是Apache官网上关于 restart  的介绍

apachectl -k restart
Sending the HUP or restart signal to the parent causes it to kill off its children like in TERM, but the parent doesn't exit. It re-reads its configuration files, and re-opens any log files. Then it spawns a new set of children and continues serving hits.


上面说的是重新读取配置文件,用restart应该是可以的,难道是因为我没有加 -k 参数吗?

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值