CDbException CDbConnection failed to open the DB connection.

Dear @twisted1919

I am using / testing last MW version 1.3.7.8 and I am getting the error below too much frequently:

"CDbException CDbConnection failed to open the DB connection."

This dissapear after a while when I refresh the page repeatedly.

This is normal or is it an error?

How can I avoid it?

Regards

Carlos Alvarez
 
I see, then you'll want to look into mysql tunning since clearly the mysql server runs the default settings and there's room for improvements.
 
Dear @twisted1919

I am getting the error "CDbException CDbConnection failed to open the DB connection." every 5 minutes aprox.

I am using MW version 1.3.7.8 and I don't know how to solve this.

I am using Ubuntu 14.04 64 Bits with Vesta CP Control Panel.

My actual /etc/mysql/my.cnf file is:

[client]
port=3306
socket=/var/run/mysqld/mysqld.sock

[mysqld_safe]
socket=/var/run/mysqld/mysqld.sock

[mysqld]
user=mysql
pid-file=/var/run/mysqld/mysqld.pid
socket=/var/run/mysqld/mysqld.sock
port=3306
basedir=/usr
datadir=/var/lib/mysql
tmpdir=/tmp
lc-messages-dir=/usr/share/mysql
log_error=/var/log/mysql/error.log

symbolic-links=0

skip-external-locking
key_buffer_size = 64K
max_allowed_packet = 1M
table_open_cache = 12
sort_buffer_size = 128K
read_buffer_size = 512K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 240K

#innodb_use_native_aio = 0
innodb_file_per_table
innodb_buffer_pool_size = 2684354560

max_connections=60
max_user_connections=20
wait_timeout=300
interactive_timeout=50
long_query_time=5

How can I improve it?

I have searched for this issue inside the MW Forum but there are no answers regarding MySQL tunning yet.

Any help would be greatly appreciated !!
 
key_buffer_size = 64K
max_allowed_packet = 1M
table_open_cache = 12
sort_buffer_size = 128K
read_buffer_size = 512K
read_rnd_buffer_size = 256K
net_buffer_length = 2K
thread_stack = 240K
max_connections=60
max_user_connections=20
wait_timeout=300
interactive_timeout=50
long_query_time=5
these should all be adjusted for large dbf and fast ops
you will find all you need through your friend google (and at least some of it on the forum)
eg
https://forum.mailwizz.com/threads/cdbexception-cdbconnection-failed-to-open-the-db-connection.1015
it is basically not a mwz problem, but a server one
 
Last edited:
Back
Top