Apr 5, 2005
Good morning,

Unfortunately I woke up this morning to two very sick vBulletin installations. From what I can gather from my logs and email alerts, cPanel upgraded MySQL from 5.0.19 to 5.0.21 last night. Immediately after the upgrade I started getting frequent errors from vBulletin queries.

Those errors being MySQL Error : Lost connection to MySQL server during query, Error Number : 2013 and MySQL Error : MySQL server has gone away
Error Number : 2006. Now I have read this thread http://www.vbulletin.com/forum/showthread.php?s=&postid=310265#post310265 about those two errors but in my case as you can see from my config below, my settings arent in question. In fact my settings (with the exception of wait_timeout which I bumped to 28800 from 300) were given to me from the folks in the vBulletin server optimization forum.

max_connections = 500
key_buffer = 64M
myisam_sort_buffer_size = 32M
join_buffer_size = 1M
read_buffer_size = 2M
read_rnd_buffer_size = 2M
sort_buffer_size = 2M
table_cache = 1500
thread_cache_size = 64
thread_concurrency = 2
wait_timeout = 28800
connect_timeout = 10
interactive_timeout = 100
tmp_table_size = 32M
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 16M
query_cache_type = 1
query_prealloc_size = 16384
query_alloc_block_size = 16384
old-passwords = 1

open_files_limit = 8192

max_allowed_packet = 16M

key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M
What I do have is a server that crashes repetatively. Using mysqladmin version Im only getting uptimes of seconds instead of days. This is a copy of my MySQL error log.

060607 09:22:46 mysqld started
060607 9:22:46 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.0.18-standard' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Edition - Standard (GPL)
060613 3:04:16 [Note] /usr/sbin/mysqld: Normal shutdown

060613 3:04:18 [Note] /usr/sbin/mysqld: Shutdown complete

060613 03:04:19 mysqld ended

060613 03:04:33 mysqld started
060613 3:04:33 [Note] /usr/sbin/mysqld: ready for connections.
Version: '5.0.21-standard' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Edition - Standard (GPL)
mysqld got signal 11;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.

It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 2111532 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0x15f7e4, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
Stack trace seems successful - bottom reached
Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow instructions on how to resolve the stack trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0xa308ed8 = SELECT forum.forumid
FROM vb3_forum AS forum
LEFT JOIN vb3_forumread AS forumread ON (forum.forumid = forumread.forumid AND forumread.userid = 117)
WHERE forum.forumid IN (11,24,-1)
AND forum.forumid NOT IN (11, -1)
AND (forum.lastpost = 0 OR
IF(forumread.readtime IS NULL, 1149320426, forumread.readtime) > forum.lastpost
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.

Number of processes running now: 0
060613 03:40:26 mysqld restarted
060613 3:40:26 [Note] /usr/sbin/mysqld: ready for connections.
I honestly dont know where to go from here. I feel I've identified the problem but dont know how to fix it besides trying to roll the server back to 5.0.19. Any other suggestions? My thanks in advance.


Well-Known Member
Oct 4, 2003
I have been having the same problem with MySQL the past few days as well, except I am using 4.1.22.

The only difference between my error_log and yours, is that the query that is listed is for a different script / user each time. It has been a vBulletin query several times though.

Anyhow, MySQL has been restarting 10+ times per day.

I've tried reverting my my.cnf back to a stock version, I've tried forcing a MySQL install.... still no luck.