View Full Version : mysql processes
haitiwebs
Mon 24th Dec '01, 11:16pm
My server is slowing down a lot, to the point that it takes 22k almost 3 minutes to load. When I do a ps -ax|more I see a lot of mysql processes that seem to be the problem. How should I interpret that and what steps can I take to solve that problem?
eva2000
Mon 24th Dec '01, 11:19pm
please provide the following
1. your server specs, such as mysql and php version
2. if possible how mysql was compiled/installed
3. your top stats
4. your mysql configuration variables located at /etc/my.cnf or c:\my.cnf if on Windows server if you don't have that file you need to log into telnet and as root user type
mysqladmin -u root -p variables
copy and paste output here
5. your mysql extended-status output either still telnet as root user type
mysqladmin -u root -p extended-status
copy and paste output here
or preferred is to installed extended-status output script which is located at http://vbulletin.com/forum/showthread.php?threadid=3477
and post url to that here
6. oh and is your vB the only thing on the server? or other scripts? sites?
if you don't have root user access ask your web host for the output or my.cnf settings they have
haitiwebs
Mon 24th Dec '01, 11:44pm
I could not find the my.cnf file. How do I copy and paste from telnet?
the mysql version is 3.23.33 and php is 4.04
below is from mysql.config file
#!/bin/sh
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# This script reports various configuration settings that may be needed
# when using the MySQL client library.
ldata='/usr/local/mysql/data'
execdir='/usr/local/mysql/libexec'
bindir='/usr/local/mysql/bin'
pkglibdir='/usr/local/mysql/lib/mysql'
pkgincludedir='/usr/local/mysql/include/mysql'
version='3.23.33'
socket='/tmp/mysql.sock'
port='3306'
ldflags=''
client_libs='-lz -lcrypt -lnsl -lm '
libs="$ldflags -L'$pkglibdir' -lmysqlclient $client_libs"
cflags="-I'$pkgincludedir'"
usage () {
cat <<EOF
Usage: $0 [OPTIONS]
Options:
--cflags [$cflags]
--libs [$libs]
--socket [$socket]
--port [$port]
--version [$version]
EOF
exit 1
}
if ! test $# -gt 0; then usage; fi
while test $# -gt 0; do
case $1 in
--cflags) echo "$cflags" ;;
--libs) echo "$libs" ;;
--socket) echo "$socket" ;;
--port) echo "$port" ;;
--version) echo "$version" ;;
*) usage ;;
esac
shift
done
#echo "ldata: '"$ldata"'"
#echo "execdir: '"$execdir"'"
#echo "bindir: '"$bindir"'"
#echo "pkglibdir: '"$pkglibdir"'"
#echo "pkgincludedir: '"$pkgincludedir"'"
#echo "version: '"$version"'"
#echo "socket: '"$socket"'"
#echo "port: '"$port"'"
#echo "ldflags: '"$ldflags"'"
#echo "client_libs: '"$client_libs"'"
exit 0
haitiwebs
Mon 24th Dec '01, 11:56pm
script (http://www.haitiwebs.com/test.php)
thanks
eva2000
Tue 25th Dec '01, 12:05am
as root user type in shell
mysqladmin -u root -p variables
and post the output here
haitiwebs
Tue 25th Dec '01, 12:11am
is there a way to copy it? they are long and I do not know how to copy in telnet.
eva2000
Tue 25th Dec '01, 12:15am
Originally posted by haitiwebs
is there a way to copy it? they are long and I do not know how to copy in telnet. hmmm should be able to just use your mouse to highlight select all of it and ctrl-C and then ctrl-V
haitiwebs
Tue 25th Dec '01, 12:16am
hope you don't mind...
number 1
haitiwebs
Tue 25th Dec '01, 12:17am
number 2
haitiwebs
Tue 25th Dec '01, 12:17am
number 3
haitiwebs
Tue 25th Dec '01, 12:18am
number 4
haitiwebs
Tue 25th Dec '01, 12:20am
mouse had never been able to highlight the telnet screen.
eva2000
Tue 25th Dec '01, 12:20am
that's only part of it
if you can't post it all just find the values among the list for
max_connections
join_buffer
key_buffer
sort_buffer
table_cache
thread_cache_size
max_user_connections
slow_queries
connect_timeout
thread_stack
wait_timeout
log
log_update
log_bin
open_files_limit
eva2000
Tue 25th Dec '01, 12:23am
i need your server specs as well
apache version
linux ?
php version ?
mysql version ?
cpu(s) speed
memory ?
average users on vB and peak users on vB
haitiwebs
Tue 25th Dec '01, 12:28am
max_connections = 100
join_buffer = 131072
key_buffer = 8388600
sort_buffer = 2097144
table_cache = 73
thread_cache_size = 0
max_user_connections = N/A (same as above?)
slow_queries = do not have that one
connect_timeout = 5
thread_stack = 65536
wait_timeout = 28800
log = off
log_update = off
log_bin = off
open_files_limit = 0
haitiwebs
Tue 25th Dec '01, 12:35am
apache version
linux ? 2.1 Debian
php version ? 4.05
mysql version ? 3.23.23
cpu(s) speed
memory ?
System Linux webs 2.0.36 #1 Sat Feb 26 15:29:08 EST 2000 i686 unknown
Build Date May 17 2001
Configure Command './configure' '--with-mysql=/usr/local/mysql' '--with-gzip' '--with-apache=../apache_1.3.19' '--enable-track-vars' '--enable-trans-sid' '--with-jpeg-dir=/usr/local/jpeg-6b'
Server API Apache
Virtual Directory Support disabled
Configuration File (php.ini) Path /usr/local/lib/php.ini
ZEND_DEBUG disabled
Thread Safety disabled
HZ 100
MACHTYPE i486-pc-linux-gnu
MAIL /var/spool/mail/installer
LANG C
SHLVL 2
HUSHLOGIN FALSE
SHELL /bin/bash
HOSTTYPE i486
OSTYPE linux-gnu
TERM ansi
average users on vB 10
and peak users on vB 17
I installed it on the 21st of december
eva2000
Tue 25th Dec '01, 1:25am
cpu and memory specs are needed to you can install phpsysinfo to find out http://phpsysinfo.sourceforge.net/
haitiwebs
Tue 25th Dec '01, 12:21pm
here is sysinfo (http://www.haitiwebs.com/sysinfo/)
eva2000
Tue 25th Dec '01, 11:13pm
Originally posted by haitiwebs
here is sysinfo (http://www.haitiwebs.com/sysinfo/) woah you only have 64MB of memory and eating into 20MB of swap which suggests you need more memory as well.
the script didn't show your cpu so in telnet type as root user
cat /proc/cpuinfo
and post the output here
haitiwebs
Tue 25th Dec '01, 11:37pm
attachment
eva2000
Tue 25th Dec '01, 11:42pm
still doesn't say what cpu speed your server is? have you asked your web host ? btw who is your web host ?
haitiwebs
Tue 25th Dec '01, 11:45pm
I am using a small company in Miami with a T3. The server is mine 100% dedicated.
haitiwebs
Tue 25th Dec '01, 11:54pm
BTW, up to last week I used to get over 3 millions pages read a month. I had a similar problem last year caused by a CRON job that used to hang some cgi processes. I since then removed it. Problem started to happen again last week. This time ps ax shows a lot of mysql processes.
haitiwebs
Wed 26th Dec '01, 2:58pm
I had a gallery software with more than 2000 images using netpbm to create thumbs. I disabled the link to prevent people from accessing it and site seems to be lightning fast and holding, so far.
vBulletin® v3.8.0 Beta 4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.