Page 1 of 1

Error: Can't connect to local MySQL server through socket...

Posted: Thu Jan 05, 2006 8:40 am
by ntegrate
Hello all! It's been some time since I've been here (nearly 2 years) - so long in fact that the username I once had (Jim) is inaccessible to me - I don't use the email address previously associated to the account and SURE don't remember the password. I'll IM an admin about that though!

Anywho, nice to be back.

I return with ill tidings! I've set a server up with Debian Sarge, MySQL, PHP4 and VHCS2 (http://www.vhcs.net) and have the following problem:

After about 48 hours of uptime, the server either does one or both of the following:

1.) Hit's a relatively high load (considering the small amount of users I have) of between 1.8 and 2
2.) Seems to terminate MySQL

I get the following error on all scripts using MySQL (which is of course almost any application I have on the server):

Code: Select all

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) in /var/www/virtual/ntegrate.org/htdocs/gallery/lib/adodb/drivers/adodb-mysql.inc.php on line 348
The error logs aren't saying too much - except for the occasional error like "Child process could not be started..." which I google and get no result for.

A quick -mysqld restart fixes the problem, but it occurs again within 48 hours.

For an example of the error:
http://www.ntegrate.org/vhcs2
http://www.ntegrate.org/gallery/main.php

Thanks for your assistance!

Posted: Thu Jan 05, 2006 11:40 am
by Chris Corbyn
High memory usage no doubt. I had this issue and it was because I'd forgotten to activate my swap :oops:

Increase you swap size of check if it's even turned on ;)

Re: Error: Can't connect to local MySQL server through socke

Posted: Thu Jan 05, 2006 11:42 am
by Chris Corbyn
ntegrate wrote:Hello all! It's been some time since I've been here (nearly 2 years) - so long in fact that the username I once had (Jim) is inaccessible to me - I don't use the email address previously associated to the account and SURE don't remember the password. I'll IM an admin about that though!
PM sent.

Posted: Thu Jan 05, 2006 2:40 pm
by ntegrate
Ba-da-bing. My swap was on, but way too small. Using a tutorial on Linux.com I quick-and-dirtied a solution and now have 512mb of swap - more than enough to handle what I need.

Problem resolved!

Thanks!

Re: Error: Can't connect to local MySQL server through socke

Posted: Thu Feb 08, 2007 8:20 am
by zdrsoft
ntegrate wrote:Hello all! It's been some time since I've been here (nearly 2 years) - so long in fact that the username I once had (Jim) is inaccessible to me - I don't use the email address previously associated to the account and SURE don't remember the password. I'll IM an admin about that though!

Anywho, nice to be back.

I return with ill tidings! I've set a server up with Debian Sarge, MySQL, PHP4 and VHCS2 (http://www.vhcs.net) and have the following problem:

After about 48 hours of uptime, the server either does one or both of the following:

1.) Hit's a relatively high load (considering the small amount of users I have) of between 1.8 and 2
2.) Seems to terminate MySQL

I get the following error on all scripts using MySQL (which is of course almost any application I have on the server):

Code: Select all

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) in /var/www/virtual/ntegrate.org/htdocs/gallery/lib/adodb/drivers/adodb-mysql.inc.php on line 348
The error logs aren't saying too much - except for the occasional error like "Child process could not be started..." which I google and get no result for.

A quick -mysqld restart fixes the problem, but it occurs again within 48 hours.

For an example of the error:
http://www.ntegrate.org/vhcs2
http://www.ntegrate.org/gallery/main.php

Thanks for your assistance!

Hello,

in VHCS control panel the high load comes from backups and traffic measuring, stop that scripts and your server load will be nice.

For more information visit my site and read the articles related to VHCS http://www.webtoolbag.com