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

  • Home
  • SEARCH
  • 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 7401673
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T04:32:07+00:00 2026-05-29T04:32:07+00:00

Very recently, I started getting the SQL max user connections limit reached error. I

  • 0

Very recently, I started getting the SQL max user connections limit reached error. I contacted my host and was notified that my limit is 10 concurrent connections at a time. But SQL is central to my website, so instead of the error I want the code to keep trying to get connection till the query is successful.

How do I do this in PHP?

EDIT: Here is the thing, I make AJAX calls to retrieve the data for the client. Every AJAX call though it takes ~400 milliseconds to finish, opens up a new MySQL connection. With 10 or more users, I run into problems.

  • 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-29T04:32:11+00:00Added an answer on May 29, 2026 at 4:32 am

    Why don’t you try using persistent connections instead?

    If you need the database connection in order for your page to work, you should block until the connection has been established. This is best implemented by having a pool of ten connections and sharing those amongst all your page instances.

    This has the added benefit of reducing the cost of connection in the first place, since fewer connection-establishment and connection-teardown calls are made.

    You didn’t say which DB engine you were using, but mysql_pconnect is one such PHP call.

    EDIT: after reading the other answers, it’s worth noting that you should never use more than one connection per page load. I’m assuming you are already only using one per page load, but you have more than ten simultaneous instances of PHP going.

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

Sidebar

Related Questions

I have recently started working on a very large C++ project that, after completing
I recently started learning Java and found it very strange that every Java public
I have very recently started development on a multiplayer browser game that will use
Ive recently started using CodeIgniter as I was searching for a very lightweight framework
I recently started diving into low level OS programming. I am (very slowly) currently
I've recently started using GNU Screen but have run into a very annoying problem.
I have just started C very recently and I have been asked to answer
Very new to FluentNHibernate, but I'm also excited about the area. I've recently started
When I started to develop with .NET under VS2008 recently, I was very happy
I have started using django very recently . I am building a service with

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.