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 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 have a Php application using stream_socket_client(), to get data through tcp from a
File is sent to the client using Response.writefile and content diposition as inline. When
I decided to make a system for a client using Castle ActiveRecord , everything
We are rolling out a site for a client using IIS tomorrow. I am
I am interested in making a Google Talk client using Python and would like
How do you return a serialized JSON object to the client side using ASP.NET
I'm using VisualSVN client and server and one of the requirements for web projects
Using the client-side ASP.NET AJAX library, I have created an instance of a client
We are using OpenLDAP client library to conect to an LDAP server. The problem

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.