sql error 2002 and 1040

Category: Databases

midnightrider
Asked:
2013-11-24 10:34 pm EST

Hits: 545
noticed today been getting these errors in my sql_error_log.cgi file

was having other sql errors that kept my forum offline that required my database to be repaired, but i think that was a theme that i have removed, but now i have these errors. what do they mean and how do i fix it?

Error: 1040 - Too many connections
Error: 2002 - Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

You must login before you can ask a follow up question.

You must login before you can submit an answer.

OTHER ANSWERS

0

JeffMa
Staff
7,372 Points
2013-11-25 9:07 am EST
I was able to pull up your account and see that you are located on a server that was having some issues. Are you still experiencing the same issues?

You must login before you can post a comment about this answer.

not yet. was thinking that a theme i was using was causing some issues, so i removed it, but would like to add it again. are these errors in the log file ok to ignore? should i repair the db again?
midnightrider
11 Points
2013-11-25 12:07 pm EST
Hello midnightrider,

Sorry for the database issues that you've been having with your forum. The errors that you've posted regarding Too many connections, and Can't connect to local MySQL server through socket are essentially both saying that your web application was unable to connect to the server's MySQL instance to pull any data.

On a shared-server this can happen sometimes when the total available MySQL connections on the server are temporarily exhausted, or more often this can be a problem with your individual user account over utilizing your limit of MySQL connections. You can read our guide on excessive MySQL activity and specifically the Persistent connections section for my info.

Basically you want to ensure that your web application isn't leaving open MySQL connections to the server, thus denying new connections on your account from happening. If you are not using persistent connections with the mysql_pconnect command and are still having issues, I would suggest that you submit a ticket to have the server reviewed for recurring MySQL connection issues.

- Jacob
JacobIMH
9,521 Points
Staff
2013-11-25 1:02 pm EST
thanks jacob, but im only running a forum and dont know anything about sql, i know the server im on had issues, but when i was running SMF i didnt have any issues that i know of. only since this has happened have i known about the sql error logs
midnightrider
11 Points
2013-11-26 12:04 am EST
Hello midnightrider,

Your forum utilizes a MySQL database, so each time it loads a post it has to connect to the MySQL server. It does look like your shared-server was having MySQL issues on 11/24, which caused your application to log the SQL errors to your error log.

It doesn't look like it's logged anymore errors since then. If you continue to experience issues with this please let us know by submitting a ticket.

- Jacob
JacobIMH
9,521 Points
Staff
2013-11-26 12:01 pm EST
Like this Question?

Related Articles

It looks like there are no related articles.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!