I've seen a similar behavior on our machine. We had someone re-write the
code for a particular PHP site that was producing tons of slow queries
(while the CPU was 100% idle the script would still take 15 seconds to
run its queries) and the problem was (sort of) fixed.
Have a constant look at "mysqladmin processlist", maybe there are tons
of mysql processes sitting sleeping. You can adjust the max. wait time
for (interactive) connections with:
In your "my.cnf", under [mysqld]:
set-variable = interactive_timeout=90
set-variable = wait_timeout=90
This will close sleeping connections after 90 seconds. Default is 8
days. However, this is not a real fix for your problems but might help
temporary so that mysqld is not taking your server down. This only makes
sense if you have sleeping processes (according to "mysqladmin
Active the sleep log, it will show you which queries take up too much
time (> 10 secs):
In your "my.cnf", under [safe_mysqld]:
log-slow-queries = /var/log/mysql-slow.log
"mysqladmin status" will show you how many slow queries you got.
Investigate /var/log/mysql-slow.log to find out what the query looked
Maybe that helps...
On Mon, 28 Oct 2002 13:46:52 -0500
"David J. Trombley" <dtrom@stripped> wrote:
> I now maintain a popular internet sports portal which runs mySQL.
> Last weekend, the server (x86 linux) started grinding to a halt.
> When I list the processes, there are many, many (much more than the
> number of webserver threads!) mysqld threads running at once, sitting
> on the CPU for long periods of time. This is new behavior, and when
> I restart the mysqld, this situation reliably occurs again in a
> minute or so.
> How can I debug/repair this sort of thing? I have no idea what's
> going on, and I've never run into this sort of problem before. Is
> there any way to get connections to the backend to time out?
> Also, the documentations makes some comment about the default
> settings for mysqld not being configured for high-load situations, but
> then fails to explain how to do this. Any suggestions?
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
> To request this thread, e-mail <mysql-thread123382@stripped>
> To unsubscribe, e-mail
> <mysql-unsubscribe-universe=truemetal.org@stripped> Trouble
> unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php