Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 07-09-2004, 03:25 PM
dustyb dustyb is offline
 
Join Date: Apr 2004
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default mysql error number: 0 - Lost Connections

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.

Quote:
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.

Code:
[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:

Code:
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.
Reply With Quote
  #2  
Old 07-09-2004, 04:03 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you haven't done so already I'd suggest posting this in the Server Configuration forum at vB.com and get eva2000 to take a look at it and see if he notices anything that can be tweaked.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:53 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05571 seconds
  • Memory Usage 2,181KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete