Welcome Guest, Not a member yet? Register   Sign In
Weird database problem causing apache die
#1

[eluser]dioslaska[/eluser]
[edit] Finally I've found the problem. The database user had no privilages to execute the stored procedures, because the procedures had different definers. Changing the definer to `user`@`hostname` solved the problem. I still don't understad though, how could this affect apache and flooding the mysql server with too many connections.


Hi everyone

I have a strange issue i'm unable to resolve. I moved my database to another server, and changed the connection settings to the new location. When I enter the address in a browser, nothing happens, the page keeps loading. Apache becomes unresponsive with the following log message:
Code:
[error] server reached MaxClients setting, consider raising the MaxClients setting
I turned on CI logging as well, in the log file I have this section repeating again and again:
Code:
Config Class Initialized
DEBUG - 2009-06-25 15:27:51 --> Hooks Class Initialized
DEBUG - 2009-06-25 15:27:51 --> URI Class Initialized
DEBUG - 2009-06-25 15:27:51 --> Router Class Initialized
DEBUG - 2009-06-25 15:27:51 --> Output Class Initialized
ERROR - 2009-06-25 15:27:51 --&gt; Severity: Warning  --&gt; fopen(/home/ccprod/public_html/system/cache/6ea9ab1baa0efb9e19094440c317e21b) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied /home/ccprod/public_html/system/codeigniter/Common.php 49
DEBUG - 2009-06-25 15:27:51 --&gt; Input Class Initialized
DEBUG - 2009-06-25 15:27:51 --&gt; Global POST and COOKIE data sanitized
DEBUG - 2009-06-25 15:27:51 --&gt; Language Class Initialized
DEBUG - 2009-06-25 15:27:51 --&gt; Loader Class Initialized
DEBUG - 2009-06-25 15:27:51 --&gt; Config file loaded: config/sphider.php
DEBUG - 2009-06-25 15:27:51 --&gt; Helpers loaded: url, form, language, string, html
DEBUG - 2009-06-25 15:27:51 --&gt; Database Driver Class Initialized
ERROR - 2009-06-25 15:27:51 --&gt; Severity: Warning  --&gt; mysqli_connect() [<a href='function.mysqli-connect'>function.mysqli-connect</a>]: (08004/1040): Too many connections /home/ccprod/public_html/system/database/drivers/mysqli/mysqli_driver.php 58
ERROR - 2009-06-25 15:27:51 --&gt; Unable to connect to the database
DEBUG - 2009-06-25 15:27:51 --&gt; Language file loaded: language/en/db_lang.php
DEBUG - 2009-06-25 15:27:51 --&gt; Config Class Initialized
DEBUG - 2009-06-25 15:27:51 --&gt; Hooks Class Initialized
DEBUG - 2009-06-25 15:27:51 --&gt; URI Class Initialized
DEBUG - 2009-06-25 15:27:51 --&gt; Router Class Initialized
DEBUG - 2009-06-25 15:27:51 --&gt; Output Class Initialized
ERROR - 2009-06-25 15:27:51 --&gt; Severity: Warning  --&gt; fopen(/home/ccprod/public_html/system/cache/d2ddea18f00665ce8623e36bd4e3c7c5) [<a href='function.fopen'>function.fopen</a>]: failed to open stream: Permission denied /home/ccprod/public_html/system/codeigniter/Common.php 49
DEBUG - 2009-06-25 15:27:51 --&gt; Input Class Initialized
DEBUG - 2009-06-25 15:27:51 --&gt; Global POST and COOKIE data sanitized
DEBUG - 2009-06-25 15:27:51 --&gt; Language Class Initialized
DEBUG - 2009-06-25 15:27:51 --&gt; Loader Class Initialized
DEBUG - 2009-06-25 15:27:51 --&gt; Config file loaded: config/sphider.php
DEBUG - 2009-06-25 15:27:51 --&gt; Helpers loaded: url, form, language, string, html
DEBUG - 2009-06-25 15:27:51 --&gt; Database Driver Class Initialized
ERROR - 2009-06-25 15:27:51 --&gt; Severity: Warning  --&gt; mysqli_connect() [<a href='function.mysqli-connect'>function.mysqli-connect</a>]: (08004/1040): Too many connections /home/ccprod/public_html/system/database/drivers/mysqli/mysqli_driver.php 58
ERROR - 2009-06-25 15:27:51 --&gt; Unable to connect to the database
DEBUG - 2009-06-25 15:27:51 --&gt; Language file loaded: language/en/db_lang.php

I have to mention also that I use the mysqli driver slightly modified to be able to execute stored procedures. I tried to switch to the mysql driver as well, same thing happens. If I give invalid connection parameters, or not at all, same results,... not even a 'could not connect to database' error message. Changing back to the original database everything works again.

What am I doing wrong??




Theme © iAndrew 2016 - Forum software by © MyBB