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

来源:互联网 发布:淘宝客定向计划不公开 编辑:程序博客网 时间:2024/04/30 12:23

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

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


在使用

apachectl restart


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

 

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

apachectl stopapachectl start


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

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

apachectl -k restartSending 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 参数吗?

原创粉丝点击