database error? or host error?
There has been a problem with the database!
This is a notice email to let you know that SMF could not connect to the database,
contact your host if this continues.
Some background of recent happenings on the server.
I have recently installed an SMF forum. I have about 90 users … but most of time I average 15-20 users online. My linode eventually crawls to a stop, where I can't ssh into my linode, I can't get to any of my urls. So basically I have to restart the linode, and start my httpd and my mysqld services.
This all started happening after I installed the forum.
Could it be the linode is just getting overloaded? Is there any way you can check?
Thanks
Rod
15 Replies
top - 10:11:53 up 6 days, 12:14, 1 user, load average: 0.08, 0.22, 0.20
The three numbers at the end there are what you should watch to monitor the cumulative CPU load on your linode. They represent the load averaged at one, five, and ten minutes respectively. For the purposes of this example, you can think of a value of "1" to equal 100% CPU load.
Below that line (and a few other lines relating to cpu and RAM usage), you'll see a long list of all the processes running on your system. By default, they'll be sorted be CPU usage with the highest users at the top of the list. In your case, you should watch this output while people are using your forum - if you're really having a CPU load issue, you'll see either apache or mysql (or whatever RDBMS you're using) pop up to the top of the display.
The other thing you should really watch is your swap usage - I'd guess that this is actually whats causing your problems. Swap usage is also displayed by "top". If it either says that you have 0k swap free or you see your swap numbers churning around rapidly, then chances are good that you're exhausting your io_tokens and are being put on the back burner by your host node.
top - 11:24:49 up 28 min, 2 users, load average: 0.22, 0.56, 0.46
Tasks: 59 total, 2 running, 57 sleeping, 0 stopped, 0 zombie
Cpu(s): 2.6% user, 1.6% system, 0.0% nice, 95.8% idle
Mem: 75388k total, 73916k used, 1472k free, 732k buffers
Swap: 365560k total, 109316k used, 256244k free, 7700k cached
This look bad?
Paste the output of this:
$ cat /proc/io_status
...
tags around these when you paste them…then they'll be rendered in monospaced fonts and will be much easier to read.
io_count=973194 io_rate=1743 io_tokens=149718 token_refill=512 token_max=400000
@rodman:
io_count=973194 io_rate=1743 io_tokens=149718 token_refill=512 token_max=400000
BAM!!! There's your problem. Your io_tokens number is quite low, and I'm guessing that your host is frequently bottoming out and having its processes limited by the host. So…you should browse through these forums and the wiki to see about slimming down your apache and DB server installs. I've never used SMF, but if it's a well written php app, there's no reason your linode shouldn't be able to support 15 concurrent users.
@anderiv:
@rodman:io_count=973194 io_rate=1743 io_tokens=149718 token_refill=512 token_max=400000
BAM!!! There's your problem. Your io_tokens number is quite low, and I'm guessing that your host is frequently bottoming out and having its processes limited by the host. So…you should browse through these forums and the wiki to see about slimming down your apache and DB server installs. I've never used SMF, but if it's a well written php app, there's no reason your linode shouldn't be able to support 15 concurrent users.
anderiv … thank you soooo much!!!
Loooks like I'll be busy looking up some threads!!!! If you find any that you may think are helpful to me can you post them here. I'll be doing my part as well!! THANK YOU SO MUCH!
FYI, the io_tokens value ideally should be as close to 400,000 as possible.
io_count=182213 io_rate=0 io_tokens=400000 token_refill=512 token_max=400000
hahha should look just like this eh? This is my io)count on the new linode I purchased a 160 linode to hopefully fix the problem. But it looks like I may not have had to do that!!!
If I cna get my tokens up … i swear I'm gonna buy you a beer … or whatever your poison is!
@rodman:
If I cna get my tokens up … i swear I'm gonna buy you a beer … or whatever your poison is!
:D
I like beer.
BEER INDEED!!
You know what …. I'm thinking it might be my SquirrelMail!!! I have noticed when I run an instance on SquirrelMail …. that's when the slowness starts!!!
I haven't run an instance of Squirrelmail for about an hour now … and now I'm at:
io_count=2213854 io_rate=651 io_tokens=365787 token_refill=512 token_max=400000
Do you use or have ued SquirrelMail? Is it that much of a memory hog?
Thanks
Rod
http://www.linode.com/~caker/uml/my.cnf
Check it out, it might help.
Enjoy.
My my.conf file looks like this:
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1
skip-bdb
[mysql.server]
user=mysql
basedir=/var/lib
[mysqld_safe]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
Do I just copy and paste all that stuff from that other my.conf file? Is it weird that my my.conf file is so small and such few entries?
As for whether you should just add those entries, I'm not sure, I can't see why not, but I don't want to point you in the wrong direction, you could back up your existing conf file to my.conf.bak and try a new one, if it didn't work just revert back to the old one untill someone can give you a more definitive answer.
Cheers.