Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 595385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:03:22+00:00 2026-05-13T16:03:22+00:00

I have an issue where users on my web site have recently begun to

  • 0

I have an issue where users on my web site have recently begun to receive the error message:

Can’t connect to local MySQL server through socket ‘/var/lib/mysql/mysql.sock’ (2)

I know that the connection strings in the code are correct, as users are able to query the database view pages that retrieve info from and submit user-generated info to the database. This leads me to believe that the error is a result of too many connections open at one time. The code is php, and each php page has itw own mysql_open and mysql_close commands, so I’m wondering if there are too many connections open at one time. I don’t know if that’s likely, given that there are only 20 people that log into the site on any given day. My question is – how can I tell how many connections are open at any given time, and can I somehow keep track of the # of connections open throughout a random day? I’m relatively new to this, and I’m using phpmyadmin to manage the database. If it is in fact too many connections, what’s the best approach to deal with it?

And are there any other possible causes that I’m not yet considering? Basically, there’s no predictable way to determine whether or not a user’s data will be submitted or whether an error will be returned, which is disconcerting from the user’s perspective, to say the least.

This question is closest to my problem but does not provide a solution to fix my specific issue, hence my posting a new question.

Thanks in advance for the ideas.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:03:23+00:00Added an answer on May 13, 2026 at 4:03 pm

    You should make sure you actually close the connections or better yet make sure that you aren’t opening too many connection on a single request. If you have a include tag in a page and both the including and the included page will do a mysql_open() you will at one point have two open connections simultaneously. You should try to avoid that and reuse the connection provided by mysql_open(). Make sure to actually close it too :-).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Happy New Year SO users! I have an issue that I hope someone can
im trying to solve this issue. I have a web site with this simplified
I have read through the Web Services site at http://developer.rallydev.com/help/ The basic issue I
I am doing a sticky note web site where users can post msg etc
I have a Web Application project where the users can upload images to the
Remote non-administrator users can't deploy a site. I've set up the delegation, web deploy
We have an issue where we need to modify keys for users that are
I have an issue where i have a textarea in a form where users
The Issue: when multiple users have access to the same working directory, permissions issues
We have used Shibboleth to authenticate users. It works great. The issue is that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.