How to disable mod_log_sql with Apache and Phusion Passenger
I'm running a RubyOnRails application with the following setup:
- apache 2.2.9
- passenger 2.2.8
- rails 2.3.8
- MySQL 5.1
when I look at the apache2 error log, I see a lot of the following errors:
[error] mod_log_sql: insufficient configuration to establish database link
[error] mod_log_sql:child spawned but unable to open database link
Since I don't see any mod_log_sql reference in the apache.conf or httpd.conf, I suspect it was enabled by Passenger.
My q开发者_运维知识库uestions are:
- Do these connection establishing hurt performance?
- How do I disable the mod_log_sql
Thanks
I don't think mod_log_sql is enabled by default.
Somebody may have set it up using a2enmod
on your machine, check with apache2ctl -M
mod_log_sql is used to log in the db, it can co-exist or replace the regular Apache logging system. If you don't require it, you can disable it using a2dismod mod_log_sql
.
If you still want to enable it. check here to properly set it up :
http://www.outoforder.cc/projects/apache/mod_log_sql/docs-2.0/?chapter=/3/
Usually it will affect performance, depending upon how you set it up. If you setup loggin on the same mysql server as your app, yes it would affect performance (Depending on traffic tho).
精彩评论