ikasama over technology

忘れたくないことを忘れないために

Apache HTTP Server の ServerLimit を変更するための再起動方法

結論

apachectl

apachectl stop; apachectl start;

SysVinit 系

service httpd|apache2 restart

systemd 系

systemctl restart httpd|apache2

解説

Apache HTTP Server のドキュメントによると ServerLimitapachectl restart で無視されるとあります。

mpm_common - Apache HTTP サーバ バージョン 2.4

実際、 ServerLimit を変更して apachectl restart すると以下のようなログが出ます。 *1 これは ServerLimit16 から 32 に変更した場合です。

[Mon Sep 24 13:36:35.613950 2018] [mpm_prefork:warn] [pid 1788] AH00179: changing ServerLimit to 32 from original valueof 16 not allowed during restart

というわけで、 ServerLimit を変更したときは apachectl stop; apachectl start; に相当するコマンドで再起動をしましょう。

servicesystemctl による Apache HTTP Server の起動停止がどういう挙動をしているかは、以下を参考にそれぞれの起動停止スクリプトを読んで理解しましょう。

Apache HTTP Server の停止と再起動 - Apache HTTP サーバ バージョン 2.4

*1: Debian 系の apache2 の場合