PDA

View Full Version : Req. Server Optimization - getting pockets of mysql error 0 msgs


wcbryant
Thu 29th Jul '04, 4:23am
I've been getting pockets of error messages (as follows) from my server;
Database error in vBulletin :
Link-ID == false, connect failed
mysql error:
mysql error number: 0

Always different users, always different scripts. They never start out the same, there seems to be no rhyme or reason to when they happen. First happened a few weeks ago, I got three or four over one minute. Then again later that day -- maybe five or six then. About a week later it happened a couple times, 10 here, 12 or so there. Then yesterday (the 28th) I had a 3 minute period where I got 72 of them. Then a few hours later 2 minutes with 60. They seem to be increasing in severity and duration.

My site (http://www.buckeyeplanet.com (http://www.buckeyeplanet.com/)) is college football (US) related, and the season is a few weeks away. So my membership and the activity levels therein have been increasing significantly. I can only assume that something is configured improperly somewhere, although these incidents don't seem to be happening during the busiest times oddly enough.

Anyway, all my info follows, I'm happy to provide more as requested. I'm afraid much of this stuff (working with the OS, mysql, PHP, etc.) is beyond me, so be gentle.

Thanks in advance for any insight. With my busiest times ahead, I'm very concerned about the downtime, and its increasing frequency/duration.

--edit--
Incidentally, does anyone know someone with availability who might be able to update FreeBSD, mysql, and php as needed? Hook up mail, generally check for security (got hit by Hackweiser about 20 months ago -- although the site itself has only been active about 6 months), and such? I'm of limited means, but I could pay something. Apologies in advance is such a question is inappropriate in this forum.

------------------

1. is this on dedicated or shared virual server
Dedicated

2. your server specs.
Dual p3 1ghz (seems to only be seeing one though?)
1gb ram
18GB 15k (x3) SCSI raid
freebsd 4.6.2-release
apache 1.3.28
php 4.3.4rc1
mysql 4.0.16-standard

3. if you use mysql 4.x instead of mysql 3.23.x, do you have any innodb type databases/tables on your server ?
I don't know what that is, so I'm guessing no.

4. if possible how mysql was compiled/installed
Afraid I don't know that either.

5. your top stats
(hope the following is what you mean, and understand this is late night when no one is online -- I tend to run between 0.50 and 1.20 or so during peak times -- also see stats.php link below)

last pid: 84583; load averages: 0.10, 0.16, 0.13 up 254+02:47:26 00:04:11
60 processes: 2 running, 57 sleeping, 1 zombie
CPU states: 0.0% user, 0.0% nice, 0.0% system, 0.0% interrupt, 100% idle
Mem: 246M Active, 125M Inact, 158M Wired, 37M Cache, 112M Buf, 437M Free
Swap: 2033M Total, 8K Used, 2033M Free

6. your mysql configuration variables located at /etc/my.cnf
[mysqld]
datadir=/var/db/mysql

7. your mysql extended-status output;
http://www.buckeyeplanet.com/forum/stats.php (http://www.buckeyeplanet.com/forum/stats.php)

8. is your vB the only thing on the server? or other scripts & sites which utilise php and mysql?
Only thing.

9. how many average and max concurrent users on your vB forum ? and what your cookie timeout is ?
Max was 204, average is around 110-120. Cookie timeout as stated in AdminCP Options is 900.

10. create a file named phpinfo.php and place this code in it and post the url/link to it from your web site
http://www.buckeyeplanet.com/forum/phpinfo.php (http://www.buckeyeplanet.com/forum/phpinfo.php)

11. if you run Apache and you have your own dedicated server or access to your httpd.conf (apache configuration file) can you post the values you have set for the following :
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 5
MaxClients 150

12. what version of vB are you running ?
3.0.1

eva2000
Thu 29th Jul '04, 5:16am
4 things to do

1. upgrade MySQL to 4.0.20
2. upgrade PHP to 4.3.8
3. change /etc/my.cnf contents to below and restart mysql


[mysqld]
datadir=/var/db/mysql
max_connections = 500
key_buffer = 16M
myisam_sort_buffer_size = 64M
join_buffer_size = 1M
read_buffer_size = 1M
sort_buffer_size = 2M
table_cache = 1024
thread_cache_size = 64
wait_timeout = 1800
connect_timeout = 10
max_allowed_packet = 16M
max_connect_errors = 10
query_cache_limit = 1M
query_cache_size = 32M
query_cache_type = 1
skip-innodb

[mysqld_safe]
open_files_limit = 8192

[mysqldump]
quick
max_allowed_packet = 16M

[myisamchk]
key_buffer = 64M
sort_buffer = 64M
read_buffer = 16M
write_buffer = 16M


4. upgrade to vB 3.0.3 to take advantage of new performance /code optimisations