title: MySQL takes a long time (hours) to determine a lost connection
body: <p>We have a service that hits a few dbs on the same separate server. The service went down, but mysql didn't abort all of the connections, and kept one open for a very long time. Below is a mysql log. We can see based on the connection id that the connection reported on the last line should have been aborted with the rest of them at 00:01, but it hung around for over 2 hours. </p>
  
  <pre><code>110216  0:00:01 [Warning] Aborted connection 11864307 to db: 'foodb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11865442 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11864559 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11863856 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11865445 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11864581 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11865447 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11864566 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11865451 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11865446 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11865444 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11864565 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11865490 to db: 'foodb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11864251 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11864299 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11864303 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11865486 to db: 'foodb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11864304 to db: 'foodb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11864560 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11864268 to db: 'foodb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11865055 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11865443 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:01 [Warning] Aborted connection 11865450 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:02 [Warning] Aborted connection 11865448 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  0:00:02 [Warning] Aborted connection 11865485 to db: 'foodb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  110216  2:11:17 [Warning] Aborted connection 11865449 to db: 'bardb' user: 'db_user' host: '10.234.1.15' (Got an error reading communication packets)
  </code></pre>
  
  <p>Now, assuming this is a problem with mysql, given the below timeout settings, is there anything that could possibly be causing this?</p>
  
  <pre><code>mysql&gt; show variables like '%time%';
  +----------------------------+-------------------+
  | Variable_name              | Value             |
  +----------------------------+-------------------+
  | connect_timeout            | 10                |
  | datetime_format            | %Y-%m-%d %H:%i:%s |
  | delayed_insert_timeout     | 300               |
  | flush_time                 | 0                 |
  | innodb_lock_wait_timeout   | 600               |
  | innodb_rollback_on_timeout | OFF               |
  | interactive_timeout        | 28800             |
  | lc_time_names              | en_US             |
  | long_query_time            | 5                 |
  | net_read_timeout           | 30                |
  | net_write_timeout          | 60                |
  | slave_net_timeout          | 3600              |
  | slow_launch_time           | 2                 |
  | system_time_zone           | GMT               |
  | table_lock_wait_timeout    | 50                |
  | time_format                | %H:%i:%s          |
  | time_zone                  | SYSTEM            |
  | timed_mutexes              | OFF               |
  | wait_timeout               | 28800             |
  +----------------------------+-------------------+
  
  mysql&gt; show variables like '%packet%';
  +--------------------+----------+
  | Variable_name      | Value    |
  +--------------------+----------+
  | max_allowed_packet | 16777216 |
  +--------------------+----------+
  </code></pre>