简体   繁体   中英

How to disable mod_log_sql with Apache and Phusion Passenger

I'm running a RubyOnRails application with the following setup:

  1. apache 2.2.9
  2. passenger 2.2.8
  3. rails 2.3.8
  4. 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 questions are:

  1. Do these connection establishing hurt performance?
  2. 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).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM