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 8466821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T15:27:20+00:00 2026-06-10T15:27:20+00:00

My shared server limits the number of concurrent connections to MySQL from PHP. Sometimes

  • 0

My shared server limits the number of concurrent connections to MySQL from PHP. Sometimes when I receive more traffic and each person needs to access the DB, they get rejected due to this max connection limitation. I was hoping that mysqlp_connect would solve the problem, but apparently a persistent connection does not keep one connection open for all users but for each user.

Is there anyway to have just ONE MySQL link always open on the server and have every user use only that link instead of creating a new link for each user?

  • 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-06-10T15:27:22+00:00Added an answer on June 10, 2026 at 3:27 pm

    I am only pulling a quote from this text, but I suggest you read this.
    In my case, I would create a connection and discard it when finished for each operation, because the overhead was so small that it didnt affect any of my systems.
    In your case you would have to look over your code and judge just how much overhead this would take; typically you would benchmark this.


    ” The answer here is extremely simple — efficiency. Persistent connections are good if the overhead to create a link to your SQL server is high. Whether or not this overhead is really high depends on many factors. Like, what kind of database it is, whether or not it sits on the same computer on which your web server sits, how loaded the machine the SQL server sits on is and so forth.
    The bottom line is that if that connection overhead is high, persistent connections help you considerably. They cause the child process to simply connect only once for its entire lifespan, instead of every time it processes a page that requires connecting to the SQL server. This means that for every child that opened a persistent connection will have its own open persistent connection to the server.
    For example, if you had 20 different child processes that ran a script that made a persistent connection to your SQL server, you’d have 20 different connections to the SQL server, one from each child. “

    Source: http://php.net/manual/en/features.persistent-connections.php

    I hope this help you!

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

Sidebar

Related Questions

We're using a shared server (on RackSpace) for Magento development. Each developer has his
If MySQL is dropping connections in a PHP application, and MySQL connection limit is
I've got a PHP script on a shared webhost that selects from ~300 'feeds'
I have an Asp.net application hosted on a shared server. I have few cache
I'm trying to install Symfony on a shared server and am attempting to duplicate
My company has a CRM site hosted externally on a shared server and recently
I have an ASP.NET 2.0 web application running on a shared server of a
I am trying to upload an ASP.NET MVC application in a shared server running
It seems like I can't use shell_exec or proc_open on my shared server. The
I'm trying to setup Microsoft reporting on a shared hosted server. I've set up

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.