{"id":292,"date":"2013-01-16T16:21:19","date_gmt":"2013-01-16T16:21:19","guid":{"rendered":"http:\/\/invisiblezero.net\/?p=292"},"modified":"2013-01-16T16:21:19","modified_gmt":"2013-01-16T16:21:19","slug":"how-to-deal-with-slow-apache2-server","status":"publish","type":"post","link":"http:\/\/ndthanh.com\/how-to-deal-with-slow-apache2-server\/","title":{"rendered":"How to deal with slow apache2 server ?"},"content":{"rendered":"
If you find your apache runs very slow, may be your server or your local machine hasn’t been configured well from the start. to remove obstacles from your way, try some of the following methods<\/p>\n
First, make a backup of \/etc\/apache2\/httpd.conf.<\/p>\n
Next, edit \/etc\/apache2\/httpd.conf in your favorite editor.<\/p>\n
Search for LoadModule.<\/p>\n
<\/p>\n
Then, comment out the modules that you don\u2019t need by adding a hash character (#) at the beginning of the line. Be judicious in what you turn off. For example, I turned off mod_userdir.so, which then caused Apache to fail on startup.<\/p>\n
Running httpd -t from the terminal showed that Apple\u2019s default httpd.conf file is using the mod_userdir.so module, so I left it on (since it presumably supports using home directories for serving Sites).<\/p>\n
For me, the modules I turned off are:<\/p>\n
\n#LoadModule authn_dbm_module libexec\/apache2\/mod_authn_dbm.so\n\n#LoadModule authn_anon_module libexec\/apache2\/mod_authn_anon.so\n\n#LoadModule authn_dbd_module libexec\/apache2\/mod_authn_dbd.so\n\n#LoadModule authn_default_module libexec\/apache2\/mod_authn_default.so\n\n#LoadModule authz_groupfile_module libexec\/apache2\/mod_authz_groupfile.so\n\n#LoadModule authz_user_module libexec\/apache2\/mod_authz_user.so\n\n#LoadModule authz_dbm_module libexec\/apache2\/mod_authz_dbm.so\n\n#LoadModule authz_owner_module libexec\/apache2\/mod_authz_owner.so\n\n#LoadModule authz_default_module libexec\/apache2\/mod_authz_default.so\n\n#LoadModule auth_basic_module libexec\/apache2\/mod_auth_basic.so\n\n#LoadModule auth_digest_module libexec\/apache2\/mod_auth_digest.so\n\n#LoadModule dbd_module libexec\/apache2\/mod_dbd.so\n\n#LoadModule mime_magic_module libexec\/apache2\/mod_mime_magic.so\n\n#LoadModule unique_id_module libexec\/apache2\/mod_unique_id.so\n\n#LoadModule proxy_connect_module libexec\/apache2\/mod_proxy_connect.so\n\n#LoadModule proxy_ftp_module libexec\/apache2\/mod_proxy_ftp.so\n\n#LoadModule proxy_scgi_module libexec\/apache2\/mod_proxy_scgi.so\n\n#LoadModule proxy_ajp_module libexec\/apache2\/mod_proxy_ajp.so\n\n#LoadModule dav_module libexec\/apache2\/mod_dav.so\n\n#LoadModule dav_fs_module libexec\/apache2\/mod_dav_fs.so\n\n#LoadModule bonjour_module libexec\/apache2\/mod_bonjour.so\n\n#LoadModule fastcgi_module libexec\/apache2\/mod_fastcgi.so\n<\/pre>\nSome time, debugger (Xdebug) and profiler was turned on without notice, please turn them off and use trigger to call these modules.<\/p>\n
i experienced this slow down issue with profiler turned on, but slowdown is not the only issue, profiler will take a lot from your hard disk space if you don’t use it properly<\/p>\n","protected":false},"excerpt":{"rendered":"
If you find your apache runs very slow, may be your server or your local machine hasn’t been configured well from the start. to remove obstacles from your way, try some of the following methods First, make a backup of \/etc\/apache2\/httpd.conf. Next, edit \/etc\/apache2\/httpd.conf in your favorite editor. Search for LoadModule. Then, comment out the…<\/p>\n