|

楼主 |
发表于 2005-12-30 22:46:09
|
显示全部楼层
[6 Jul 22:38] Rich Brome I've been having this problem as well, using MySQL 4.1.12 on
RedHat. Like
others, I'm using a private connection and IPs to connect the web and database
servers.
It was driving me mad. When it happened, (more often during peak hours, but
sometimes off-peak as well,) it was freezing Apache completely on both of my web
servers for up to five minutes, taking my site down completely. It always
corrected itself within 5 minutes, but 5-minute outages a dozen times a day was
pretty frustrating.
Lowering the connect timeout tamed the Apache lockups, but the MySQL lockups
still happened, so I then was getting streams of "Lost connection" and "Can't
connect" errors from my site.
It took me forever to finally catch an event while I was logged in to MySQL, but
then I finally did, and saw what others here described - hundreds of processes,
all stuck at "Connect".
Simply adding "skip-name-resolve" to my.cnf seems to have solved all my
problems.
I think it's a pretty serious bug that the default config will do this,
apparently whenever there are private IP addresses and high loads, which can't
be that uncommon.
不知道哪种方法解决更有效,更稳定。 |
|