Jump to content

Frequent MySQL problem


Recommended Posts

Hi,
 
frequently observe the following error (see below) when trying to reach my web-shop with a browser.
 
 
Link to database cannot be established: SQLSTATE[HY000] [2002] Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
 
Issued a ticket to hosting company and received the following:
 
The drops in the MySQL connection are actually not due to server wide issues with MySQL, but are due to your queries hitting limits on our server which cause your queries to be killed. These limits are dynamic and based on load, slow_query time and a variety of other factors.
 
Our system has fairly generous limits so the first thing I would suggest is if you can optimize anything going on in that database and see if you can stay under the limits. 

 

Can anyone help me with this as it happens way to often and I don't want to loose sales because of this error?

 

Thank you in advance!

Link to comment
Share on other sites

I believe that hosting is good enough here. Moreover it's recommended by Presta - A2 hosting.

 

The mentioned problem started to appear when I moved my newly developed shop to the real domain... During the building process I haven't experienced such thing...

Link to comment
Share on other sites

  • 3 months later...

I am not sure if it really helped. Therefore, I would rather recommend to optimize tables in your DB (see here http://www.happyat.net/billing/knowledgebase.php?action=displayarticle&id=9) it helps a bit as a reason I started to get these kind of errors was that queries were too slow.

Eventually, I upgraded my hosting package from Shared WEB to Managed VPS and these errors disappeared. However, I just managed to solve the symptoms, but not the reason. My shop sometimes gets very slow and it works (even slowly) just because there is no query governor which kills too slow queries.

 

I hope it helped.

Cheers!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...