dustyb
07-09-2004, 03:25 PM
I have been getting the following error message consistently since the launch of our vB 3.01 site last month, around a half dozen of them per day.
Database error in vBulletin :
Link-ID == false, connect failed: Lost connection to MySQL server during query mysql error:
mysql error number: 0
I added the mysql error message to the relevant PHP file, so I'm getting a little more detail after the connect failed: I've seen this error posted a couple times and the response usually involves tweaks to the mysql conf. But I'm not sure I've seen anyone report resolution. I'm using a variant of big.cnf. Here it is. If anybody sees anything I might tweak, I'd be much obliged.
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
max_connections = 256
wait_timeout = 28800
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 2M
read_buffer_size = 2M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size= 20M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 4
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
# Replication Master Server (default)
# binary logging is required for replication
#log-bin
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
#server-id = 1
# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
#
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
# where you replace <host>, <user>, <password> by quoted strings and
# <port> by the master's port number (3306 by default).
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave - required
#master-host = <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user = <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password = <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port = <port>
#
# binary logging - not required for slaves, but recommended
#log-bin
# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname
# Uncomment the following if you are using BDB tables
#bdb_cache_size = 64M
#bdb_max_lock = 100000
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 256M
#innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 64M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
I'm running RedHat ES 3 on a Dell PowerEdge 2650 with 1GB RAM and a single 1.2 Ghz Xeon hyper-thread processor. Here is a top sorted by memory with the mysqld processes on top:
12:15:11 up 42 days, 21:47, 1 user, load average: 0.00, 0.02, 0.00
73 processes: 72 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 2.3% 0.0% 0.1% 0.0% 0.0% 0.1% 97.2%
cpu00 0.1% 0.0% 0.0% 0.0% 0.0% 0.1% 99.6%
cpu01 4.5% 0.0% 0.3% 0.0% 0.0% 0.1% 94.8%
Mem: 1028540k av, 860616k used, 167924k free, 0k shrd, 182896k buff
595396k actv, 40424k in_d, 13760k in_c
Swap: 1020088k av, 1992k used, 1018096k free 400448k cached
3398 mysql 15 0 115M 115M 1748 S 0.0 11.4 0:23 0 mysqld
3399 mysql 15 0 115M 115M 1748 S 0.0 11.4 0:16 1 mysqld
3400 mysql 20 0 115M 115M 1748 S 0.0 11.4 0:00 1 mysqld
3401 mysql 15 0 115M 115M 1748 S 0.0 11.4 0:00 1 mysqld
3402 mysql 25 0 115M 115M 1748 S 0.0 11.4 0:00 1 mysqld
3403 mysql 15 0 115M 115M 1748 S 0.0 11.4 0:00 1 mysqld
3404 mysql 24 0 115M 115M 1748 S 0.0 11.4 0:00 1 mysqld
3405 mysql 15 0 115M 115M 1748 S 0.0 11.4 19:58 1 mysqld
3406 mysql 15 0 115M 115M 1748 S 0.0 11.4 0:00 1 mysqld
3407 mysql 15 0 115M 115M 1748 S 0.0 11.4 1:08 0 mysqld
3408 mysql 15 0 115M 115M 1748 S 0.0 11.4 6:29 0 mysqld
3410 mysql 15 0 115M 115M 1748 S 0.0 11.4 6:29 1 mysqld
3428 mysql 15 0 115M 115M 1748 S 0.0 11.4 6:48 1 mysqld
3562 mysql 15 0 115M 115M 1748 S 0.0 11.4 6:48 1 mysqld
4932 mysql 15 0 115M 115M 1748 S 0.0 11.4 6:04 0 mysqld
14536 mysql 15 0 115M 115M 1748 S 0.0 11.4 5:15 0 mysqld
14542 mysql 15 0 115M 115M 1748 S 0.0 11.4 5:02 0 mysqld
14545 mysql 15 0 115M 115M 1748 S 0.0 11.4 5:12 0 mysqld
Always appreciate the good folks on this board, thanks in advance.
Database error in vBulletin :
Link-ID == false, connect failed: Lost connection to MySQL server during query mysql error:
mysql error number: 0
I added the mysql error message to the relevant PHP file, so I'm getting a little more detail after the connect failed: I've seen this error posted a couple times and the response usually involves tweaks to the mysql conf. But I'm not sure I've seen anyone report resolution. I'm using a variant of big.cnf. Here it is. If anybody sees anything I might tweak, I'd be much obliged.
[client]
#password = your_password
port = 3306
socket = /var/lib/mysql/mysql.sock
# Here follows entries for some specific programs
# The MySQL server
[mysqld]
max_connections = 256
wait_timeout = 28800
port = 3306
socket = /var/lib/mysql/mysql.sock
skip-locking
key_buffer = 256M
max_allowed_packet = 1M
table_cache = 256
sort_buffer_size = 2M
read_buffer_size = 2M
myisam_sort_buffer_size = 64M
thread_cache = 8
query_cache_size= 20M
# Try number of CPU's*2 for thread_concurrency
thread_concurrency = 4
# Don't listen on a TCP/IP port at all. This can be a security enhancement,
# if all processes that need to connect to mysqld run on the same host.
# All interaction with mysqld must be made via Unix sockets or named pipes.
# Note that using this option without enabling named pipes on Windows
# (via the "enable-named-pipe" option) will render mysqld useless!
#
#skip-networking
# Replication Master Server (default)
# binary logging is required for replication
#log-bin
# required unique id between 1 and 2^32 - 1
# defaults to 1 if master-host is not set
# but will not function as a master if omitted
#server-id = 1
# Replication Slave (comment out master section to use this)
#
# To configure this host as a replication slave, you can choose between
# two methods :
#
# 1) Use the CHANGE MASTER TO command (fully described in our manual) -
# the syntax is:
#
# CHANGE MASTER TO MASTER_HOST=<host>, MASTER_PORT=<port>,
# MASTER_USER=<user>, MASTER_PASSWORD=<password> ;
#
# where you replace <host>, <user>, <password> by quoted strings and
# <port> by the master's port number (3306 by default).
#
# Example:
#
# CHANGE MASTER TO MASTER_HOST='125.564.12.1', MASTER_PORT=3306,
# MASTER_USER='joe', MASTER_PASSWORD='secret';
#
# OR
#
# 2) Set the variables below. However, in case you choose this method, then
# start replication for the first time (even unsuccessfully, for example
# if you mistyped the password in master-password and the slave fails to
# connect), the slave will create a master.info file, and any later
# change in this file to the variables' values below will be ignored and
# overridden by the content of the master.info file, unless you shutdown
# the slave server, delete master.info and restart the slaver server.
# For that reason, you may want to leave the lines below untouched
# (commented) and instead use CHANGE MASTER TO (see above)
#
# required unique id between 2 and 2^32 - 1
# (and different from the master)
# defaults to 2 if master-host is set
# but will not function as a slave if omitted
#server-id = 2
#
# The replication master for this slave - required
#master-host = <hostname>
#
# The username the slave will use for authentication when connecting
# to the master - required
#master-user = <username>
#
# The password the slave will authenticate with when connecting to
# the master - required
#master-password = <password>
#
# The port the master is listening on.
# optional - defaults to 3306
#master-port = <port>
#
# binary logging - not required for slaves, but recommended
#log-bin
# Point the following paths to different dedicated disks
#tmpdir = /tmp/
#log-update = /path-to-dedicated-directory/hostname
# Uncomment the following if you are using BDB tables
#bdb_cache_size = 64M
#bdb_max_lock = 100000
# Uncomment the following if you are using InnoDB tables
#innodb_data_home_dir = /var/lib/mysql/
#innodb_data_file_path = ibdata1:10M:autoextend
#innodb_log_group_home_dir = /var/lib/mysql/
#innodb_log_arch_dir = /var/lib/mysql/
# You can set .._buffer_pool_size up to 50 - 80 %
# of RAM but beware of setting memory usage too high
#innodb_buffer_pool_size = 256M
#innodb_additional_mem_pool_size = 20M
# Set .._log_file_size to 25 % of buffer pool size
#innodb_log_file_size = 64M
#innodb_log_buffer_size = 8M
#innodb_flush_log_at_trx_commit = 1
#innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
# Remove the next comment character if you are not familiar with SQL
#safe-updates
[isamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
I'm running RedHat ES 3 on a Dell PowerEdge 2650 with 1GB RAM and a single 1.2 Ghz Xeon hyper-thread processor. Here is a top sorted by memory with the mysqld processes on top:
12:15:11 up 42 days, 21:47, 1 user, load average: 0.00, 0.02, 0.00
73 processes: 72 sleeping, 1 running, 0 zombie, 0 stopped
CPU states: cpu user nice system irq softirq iowait idle
total 2.3% 0.0% 0.1% 0.0% 0.0% 0.1% 97.2%
cpu00 0.1% 0.0% 0.0% 0.0% 0.0% 0.1% 99.6%
cpu01 4.5% 0.0% 0.3% 0.0% 0.0% 0.1% 94.8%
Mem: 1028540k av, 860616k used, 167924k free, 0k shrd, 182896k buff
595396k actv, 40424k in_d, 13760k in_c
Swap: 1020088k av, 1992k used, 1018096k free 400448k cached
3398 mysql 15 0 115M 115M 1748 S 0.0 11.4 0:23 0 mysqld
3399 mysql 15 0 115M 115M 1748 S 0.0 11.4 0:16 1 mysqld
3400 mysql 20 0 115M 115M 1748 S 0.0 11.4 0:00 1 mysqld
3401 mysql 15 0 115M 115M 1748 S 0.0 11.4 0:00 1 mysqld
3402 mysql 25 0 115M 115M 1748 S 0.0 11.4 0:00 1 mysqld
3403 mysql 15 0 115M 115M 1748 S 0.0 11.4 0:00 1 mysqld
3404 mysql 24 0 115M 115M 1748 S 0.0 11.4 0:00 1 mysqld
3405 mysql 15 0 115M 115M 1748 S 0.0 11.4 19:58 1 mysqld
3406 mysql 15 0 115M 115M 1748 S 0.0 11.4 0:00 1 mysqld
3407 mysql 15 0 115M 115M 1748 S 0.0 11.4 1:08 0 mysqld
3408 mysql 15 0 115M 115M 1748 S 0.0 11.4 6:29 0 mysqld
3410 mysql 15 0 115M 115M 1748 S 0.0 11.4 6:29 1 mysqld
3428 mysql 15 0 115M 115M 1748 S 0.0 11.4 6:48 1 mysqld
3562 mysql 15 0 115M 115M 1748 S 0.0 11.4 6:48 1 mysqld
4932 mysql 15 0 115M 115M 1748 S 0.0 11.4 6:04 0 mysqld
14536 mysql 15 0 115M 115M 1748 S 0.0 11.4 5:15 0 mysqld
14542 mysql 15 0 115M 115M 1748 S 0.0 11.4 5:02 0 mysqld
14545 mysql 15 0 115M 115M 1748 S 0.0 11.4 5:12 0 mysqld
Always appreciate the good folks on this board, thanks in advance.