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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T09:23:00+00:00 2026-05-20T09:23:00+00:00

A client is using PHP to connect to MySQL. The PHP scripts and the

  • 0

A client is using PHP to connect to MySQL. The PHP scripts and the MySQL database are located on 2 different Linux servers. He complained that database connections were being dropped or timed out and asked me to take a look.

Is there any place in MySQL that can show me what and how many connections have been dropped or timed out? I looked into slow query log and didn’t see anything.

Any suggestions on how to diagnose this dropped/timed out database connection problem?

Thanks

  • 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-20T09:23:01+00:00Added an answer on May 20, 2026 at 9:23 am

    You can certainly monitor the

    Aborted_clients
    

    Status variable (i.e. with SHOW GLOBAL STATUS) and see connection timeouts.

    However, the best place to detect this is on the client-side. Assuming you have proper error handling and logging on the client side, you’ll generally see the famous “Server has gone away” error.

    As your application is written in PHP, there is a likelihood that it doesn’t have proper error handling / logging. You should fix that.


    A common cause of this is the abuse of persistent connections from an Apache prefork server. Because Apache prefork servers generally keep processes around for a long time doing no work, but persistent connections can remain open from each process, the connections can end up being idle for too long, creating the “Morning bug”.

    The fix for this is simple – just turn OFF persistent connections. They are an inappropriate pessimisation in almost every case.

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

Sidebar

Related Questions

Environment: RHEL 5 servers, MySQL 5.1.43, PHP 5.1.6 (using MySQLi). Currently only available within
I'm writing my first script that will connect via SSL to a MySQL database.
I am using nginx, PHP and MYSQL. I setup a database and a user
I have designed a webpage using HTML and client side validation using JavaScript.PHP for
Long story short, client's hosting is using php 5.2.5 and i desperately need to
When using the PHP Sphinx client this works: SphinxClient::query ('*', 'index1'); But when I
I'm adding Experian's Quick Address Postcode Lookup to a client's website using a javascript/PHP
im using the Facebook PHP Client library and want to get the Events of
I am using the Google Api PHP client to Log the user in. I
Background: Using jQuery 1.7 client side PHP server side Using json responses with json_encode

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.