Thread: mysql remote connect hanging
hi--
running couple ubuntu 8.1 server vps instances on slicehost-- 1 db server running mysql , 1 apache 2 webserver.
several months i've had no issues-- db server bound webserver, accepted connections web server, both in my.cnf , iptables.
i've gotten more traffic, , i'm getting mysql connection errors in php pages pretty frequently. reduced number of apache maxclients, startservers, etc. try deal server swapping (though don't think that's issue here).
can ssh web server , when try connect cli mysql on db server, hangs 15-30 seconds gives me
"error 2003 (hy000): can't connect mysql server" (which suggest bad my.cnf or dead mysql server think)
few minutes later, can connect no problem. , whole time, can verify db server , accepting connections via ssh session machine.
have ideas on this? can type of problem caused overloaded server or insufficient memory on web server machine? advice appreciated, let me know if need more info.
it sounds hitting mysql max_connections limit. default, 100 connections can eaten pretty if not fastidious closing connections no longer need them in application. double check, @ results of below command run against mysql server (it takes standard '-h', '-u' , '-p' flags):
if run when having issue, expect see number of stuck queries or connections haven't been closed. can max_connections settings in my.cnf if indeed hitting limit it's indicitive of fact code needs revised, queries need revised or need larger mysql installation.code:mysqladmin processlist
Forum The Ubuntu Forum Community Ubuntu Specialised Support Ubuntu Servers, Cloud and Juju Server Platforms [ubuntu] mysql remote connect hanging
Ubuntu
Comments
Post a Comment