HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Database connection error (2): Could not connect to MySQL after PHP upgrade (http://www.howtoforge.com/forums/showthread.php?t=60605)

pawan 18th February 2013 16:19

Database connection error (2): Could not connect to MySQL after PHP upgrade
 
I have upgraded my php from 5.3 to 5.4 and now I am getting frequent mysql error:
Database connection error (2): Could not connect to MySQL

is it related to php upgrade or some other reason.

I am also getting this error when I trying to log on ISPCONFIG admin

Code:

DB::__construct Too many connectionsDB::__construct Too many connectionsDB::query(SELECT * FROM sys_session WHERE session_id = '') -> mysqli_query Too many connections#0 db
ISPCONFIG SERVER LOG
Code:

PHP Warning: mysqli::close(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 70
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
PHP Warning: mysqli::mysqli(): (08004/1040): Too many connections in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 61
DB::__construct Too many connections
PHP Warning: mysqli::query(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 65
PHP Warning: mysqli::query(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 66
PHP Warning: mysqli::ping(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 106
PHP Warning: mysqli::query(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 107
PHP Warning: mysqli::escape_string(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 166
PHP Warning: mysqli::ping(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 106
PHP Warning: mysqli::query(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 107
PHP Warning: mysqli::close(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 70
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
Failed loading /usr/lib/php5/20090626/xcache.so: /usr/lib/php5/20090626/xcache.so: cannot open shared object file: No such file or directory
PHP Warning: mysqli::mysqli(): (HY000/2002): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 61
DB::__construct Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

I am also getting this error repeatadely in ispconfig log
Code:

ERROR - Plugins directory missing: /usr/local/ispconfig/server/plugins-core/

till 18th February 2013 18:16

1) Set:

max_connections = 500
max_user_connections = 500

in [mysqld] section of the /etc/mysql/my.cnf file and restart mysql.

2) Your xcache extension does not seem to be correct for your new php version.

3) Seems as if parts of your ispcnfig install have been removed if the directory /usr/local/ispconfig/server/plugins-core/ is missing.

pawan 18th February 2013 19:06

Thanks Till

I have made the changes in mysql my.cnf file as per your suggestion and update you.

what should I do for removing the xcahe error. I think I am not using xcache in any of the setup.

Quote:

Seems as if parts of your ispcnfig install have been removed if the directory /usr/local/ispconfig/server/plugins-core/ is missing.
Today I have upgrade my ispconfig installation, in there I also didn't find the plugins-core directory.
I have checked the older backups, where there is a plugins-core directory, but that is empty.
How can I restore this folder.

Again I am getting another error repeatedly like this
Code:

PHP Warning: mysqli::escape_string(): Couldn't fetch db in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 204

PHP Warning: mysqli::mysqli(): (08004/1040): Too many connections in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 71
DB::__construct Too many connections

my ispconfig version is 3.05 RC2.


All times are GMT +2. The time now is 05:59.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.