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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T03:23:42+00:00 2026-05-31T03:23:42+00:00

If MySQL is dropping connections in a PHP application, and MySQL connection limit is

  • 0

If MySQL is dropping connections in a PHP application, and MySQL connection limit is set above the number of concurrent users in the application, which other factors can contribute to this behavior? Also, analyzing moodle logs (the only app running at these servers), yesterday I had 4 times more activity and it didn’t drop anything, but today there were times where it was frustrating the number of dropped connections.

My main question here is why the database is rejecting connections when it didn’t before with 4 times more activity (and everything it’s the same, I didn’t change anything in between).

Some background: I’ve got 2 servers contracted at my hosting:

  • shared server running Debian Linux/PHP 5.3 (FastCGI)
  • VPS running Debian Linux/MySQL 5.1.39

On this environment I’m running only moodle 1.9.12 (for the database connection using adoDB and persistent connections), php part on the shared server, database on the VPS. I suspect that, by PHP running on a shared server, other hosting accounts are affecting me (the database rejecting connections I mean, I really don’t care about RAM/CPU).

Reading about the issue I’ve seen in places that persistent connections don’t work well with PHP as CGI/FastCGI and that if both servers are in the local lan it really doesn’t matter using persistent or not persistent connections because of the connection is going to be quick anyway. So now I’m using not persistent connections. I guess that may be part of the problem, but I fail to understand why it worked with more load. Which PHP/Apache settings are involved here?

  • 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-31T03:23:43+00:00Added an answer on May 31, 2026 at 3:23 am

    Since your database and web server are on two different machines, there are two other possible causes: the network in between, and the network layer of the operating system.

    If you did not change anything in your configuration and it worked with higher loads before, it is more likely to be an issue with the network connectivity between the two machines. Since the database machine is a VPS you also don’t know how much real network load it is handling. If your ISP has competent support personnel (which unfortunately isn’t always the case) it can’t hurt to ask them if they have an explanation.

    The same goes for your “shared” web-server. While it is unlikely, it is not impossible that it is a an issue of too many connections on that machine.

    It would also help to know how exactly you are measuring dropped connections. If you are looking at the aborted-connections counter of mySQL, it is not necessarily a measure of an actual problem: http://dev.mysql.com/doc/refman/5.1/en/communication-errors.html. A user aborting a page load already may increase this counter.

    If PHP throws an error, because it could not connect to the server or lost connection to the server during a query, then it is an issue.

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

Sidebar

Related Questions

Mysql's environment is following: character_set_database=big5 And when I send a SQL which contains tranditional
Ok, this is driving me crazy. My PHP version is 5.2.17, MySQL version is
Does dropping a MySQL table automatically drop that table's indices too?
I am developing a Grails-application which uses several databases, others are read-only and 1
I have an application that uses Hibernate to connect to my MySQL database. I'm
I have MySQL server installed and I would like it to stop dropping inactive
I'm making a browser MMO using PHP and MySQL. I'm hesitating between two ways
MySQL double while loop in php: $geta=mysql_query(SELECT id FROM table1 WHERE id<50); while($row=mysql_fetch_array($geta)){ while($row2=mysql_fetch_array($geta)){
My SQL query isn't dropping anything into the combobox. The connection seems to be
I just read about mysql's SQL_CALC_FOUND_ROWS and FOUND_ROWS() which helps you get the total

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.