apache mpm preforkをworkerに変更する
# apachectl -V | grep 'Server MPM'Server MPM: Prefork |
現在はpreforkを使用しています。
MPM切り替え
# vi /etc/sysconfig/httpdHTTPD=/usr/sbin/httpd.worker ←コメントアウトを外す# /etc/init.d/httpd restartWorkerになったらOK。# apachectl -V | grep 'Server MPM'Server MPM: Workerあとはapache設定を変更する# vi /etc/httpd/conf/httpd.conf<IfModule worker.c>StartServers 4MaxClients 300MinSpareThreads 25MaxSpareThreads 75ThreadsPerChild 25MaxRequestsPerChild 0</IfModule> |
phpを使う場合
PHPは5.5くらいからスレッドが使えるようになるため、オプションをつけて再コンパイルを行う。
# make distclean
# ./configure –with-tsrm-pthreads –enable-maintainer-zts ・・・
# make && make install
# ./configure –with-tsrm-pthreads –enable-maintainer-zts ・・・
# make && make install
しかし、動作が不安定になってしまったので、preforkに戻した。
wordpressだとだめなのかな。
要調査
wordpressだとだめなのかな。
要調査
参考
http://blog.flatlabs.net/20110222_232623/