CMiksche / dbd-modules

Automatically exported from code.google.com/p/dbd-modules
0 stars 0 forks source link

Getting "unable to execute SQL statement:" errors after a few requests #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Installed software on centos 5.6 using apache 2.2.3
2. Configured with custom SQL 
3. Hit server with various requests for various virtual hosts and after several 
requests started getting "unable to execute SQL statement:" error in the apache 
main error.log

What is the expected output? What do you see instead?
Expected result was the module working and displaying the sites as needed.

What version of the product are you using? On what operating system?
Centos 5.6
httpd-devel-2.2.3-53.el5.centos.3
httpd-2.2.3-53.el5.centos.3
httpd-devel-2.2.3-53.el5.centos.3
apr-util-1.2.7-11.el5_5.2
apr-1.2.7-11.el5_6.5
apr-devel-1.2.7-11.el5_6.5
apr-util-1.2.7-11.el5_5.2
apr-util-devel-1.2.7-11.el5_5.2
apr-1.2.7-11.el5_6.5
apr-util-mysql-1.2.7-11.el5_5.2 <- this was downloaded from rpmfind.net

Please provide any additional information below.

Errorlog after a few requests:
[Tue Mar 13 20:53:47 2012] [crit] [client xx] mod_vhost_dbd: Unable to execute 
SQL statement:
[Tue Mar 13 20:53:58 2012] [crit] [client xx] mod_vhost_dbd: Unable to execute 
SQL statement: , referer: http://orlando.xx.com/
[Tue Mar 13 20:53:58 2012] [crit] [client xx] mod_vhost_dbd: Unable to execute 
SQL statement: , referer: http://orlando.xx.com/
[Tue Mar 13 20:53:58 2012] [crit] [client xx] mod_vhost_dbd: Unable to execute 
SQL statement: , referer: http://orlando.xx.com/

Config from apache:

DBDriver mysql
DBDParams 
host=localhost,user=haven_staging,pass=VfMuxrWOUEc4WHbx,db=lotd_haven_staging
DBDOCRoot "select concat('/var/www/html/', substring_index( 
reverse(substring_index(reverse(%s), '.', 2)), '.', 1), '/wpmu/htdocs/') from 
otherstuff(%s, '.', 1)) and otherstuff(%s, '.', -2)) " HOSTNAME HOSTNAME 
HOSTNAME

My goal is to have the server return a default hostname unless the sql 
(abbreviated above) returns a result (which is the hostname), and if it does 
then use that hostname.  This should let me have *.domain.com pointed to one IP 
and based on a db entry have it point to either a generic website or a "real" 
website.

This seems to work on my debian test server, but on centos this happens.  Maybe 
an overloaded mysql server causing results to fail, and then the modules caches 
the error?

Original issue reported on code.google.com by arcte...@gmail.com on 14 Mar 2012 at 1:25

GoogleCodeExporter commented 9 years ago
Sorry for the late reply.  Is there anything in your MySQL logs which might 
shed some light?

Original comment by Thomas.D...@gmail.com on 14 May 2012 at 2:15

GoogleCodeExporter commented 9 years ago
Please re-open (or send me email) if this is still an issue on CentOS.
Closing.
-tom-

Original comment by Thomas.D...@gmail.com on 13 Sep 2012 at 11:00