List:General Discussion« Previous MessageNext Message »
From:Vincent Stoessel Date:April 6 1999 9:16pm
Subject:Mysql Disconnections
View as plain text  
Hello, I've been noticing occasional diconnects from a remote 
machine using php3. The client machine would give me an error
like :
PHP 3 Warning:  MySQL Connection Failed: Lost connection to MySQL server during query.
It would last for a few seconds and stop, no big deal. But just now started getting a lot
of
disconnects.
fortunately I was logged in using the command-line client. I did these 2 commands, notice 
the Delayed_insert_threads:


mysql> show status 
    -> ;
+--------------------------+------------+
| Variable_name            | Value      |
+--------------------------+------------+
| Aborted_clients          | 1          |
| Aborted_connects         | 0          |
| Created_tmp_tables       | 0          |
| Delayed_insert_threads   | 4294967295 |
| Delayed_writes           | 457        |
| Delayed_errors           | 0          |
| Flush_commands           | 2          |
| Handler_delete           | 1385       |
| Handler_read_first       | 0          |
| Handler_read_key         | 4949647    |
| Handler_read_next        | 219192230  |
| Handler_read_rnd         | 79415078   |
| Handler_update           | 42312      |
| Handler_write            | 1949       |
| Key_blocks_used          | 1195       |
| Key_read_requests        | 15470499   |
| Key_reads                | 1136       |
| Key_write_requests       | 98938      |
| Key_writes               | 63263      |
| Max_used_connections     | 124        |
| Not_flushed_key_blocks   | 0          |
| Not_flushed_delayed_rows | 0          |
| Open_tables              | 106        |
| Open_files               | 54         |
| Open_streams             | 0          |
| Opened_tables            | 106        |
| Questions                | 451320     |
| Running_threads          | 114        |
| Slow_queries             | 71         |
| Uptime                   | 76161      |
+--------------------------+------------+
30 rows in set (0.01 sec)


Notice the State and Info columns 
mysql> show processlist ;
+-------+------+-------------+--------------+---------+------+-------+------------------+
| Id    | User | Host        | db           | Command | Time | State | Info             |
+-------+------+-------------+--------------+---------+------+-------+------------------+
| 21993 | www  | localhost   | adserver     | Sleep   | 83   | NULL  | NULL             |
| 21996 | www  | localhost   | hitlist      | Sleep   | 122  | NULL  | NULL             |
| 21998 | www  | localhost   | adserver     | Sleep   | 10   | NULL  | NULL             |
| 22000 | www  | localhost   | hitlist      | Sleep   | 28   | NULL  | NULL             |
| 22002 | www  | localhost   | hitlist      | Sleep   | 469  | NULL  | NULL             |
| 22005 | www  | localhost   | adserver     | Sleep   | 250  | NULL  | NULL             |
| 22012 | www  | localhost   | adserver     | Sleep   | 192  | NULL  | NULL             |
| 22014 | www  | localhost   | hitlist      | Sleep   | 128  | NULL  | NULL             |
| 22019 | www  | localhost   | adserver     | Sleep   | 63   | NULL  | NULL             |
| 22020 | www  | localhost   | hitlist      | Sleep   | 164  | NULL  | NULL             |
| 22021 | www  | localhost   | adserver     | Sleep   | 113  | NULL  | NULL             |
| 22023 | www  | localhost   | adserver     | Sleep   | 180  | NULL  | NULL             |
| 22029 | www  | localhost   | hitlist      | Sleep   | 86   | NULL  | NULL             |
| 22031 | www  | localhost   | adserver     | Sleep   | 135  | NULL  | NULL             |
| 22033 | www  | localhost   | adserver     | Sleep   | 71   | NULL  | NULL             |
| 22035 | www  | localhost   | adserver     | Sleep   | 106  | NULL  | NULL             |
| 22039 | www  | localhost   | hitlist      | Sleep   | 41   | NULL  | NULL             |
| 22048 | www  | localhost   | adserver     | Sleep   | 170  | NULL  | NULL             |
| 22051 | www  | localhost   | xaymaca      | Sleep   | 80   | NULL  | NULL             |
| 22052 | www  | localhost   | adserver     | Sleep   | 123  | NULL  | NULL             |
| 22057 | www  | localhost   | adserver     | Sleep   | 307  | NULL  | NULL             |
| 22068 | www  | localhost   | xaymaca      | Sleep   | 338  | NULL  | NULL             |
| 22072 | www  | localhost   | hitlist      | Sleep   | 67   | NULL  | NULL             |
| 22078 | www  | localhost   | xaymaca      | Sleep   | 511  | NULL  | NULL             |
| 22085 | www  | localhost   | hitlist      | Sleep   | 140  | NULL  | NULL             |
| 22086 | www  | localhost   | hitlist      | Sleep   | 211  | NULL  | NULL             |
| 22095 | www  | localhost   | adserver     | Sleep   | 139  | NULL  | NULL             |
| 22099 | www  | localhost   | adserver     | Sleep   | 129  | NULL  | NULL             |
| 22106 | www  | localhost   | hitlist      | Sleep   | 80   | NULL  | NULL             |
| 22109 | www  | localhost   | adserver     | Sleep   | 53   | NULL  | NULL             |
| 22118 | www  | localhost   | hitlist      | Sleep   | 424  | NULL  | NULL             |
| 22124 | www  | localhost   | xaymaca      | Sleep   | 31   | NULL  | NULL             |
| 22127 | www  | localhost   | adserver     | Sleep   | 91   | NULL  | NULL             |
| 22131 | www  | localhost   | adserver     | Sleep   | 117  | NULL  | NULL             |
| 22144 | www  | localhost   | hitlist      | Sleep   | 22   | NULL  | NULL             |
| 22152 | www  | localhost   | hitlist      | Sleep   | 154  | NULL  | NULL             |
| 22159 | www  | localhost   | adserver     | Sleep   | 2    | NULL  | NULL             |
| 22182 | www  | localhost   | adserver     | Sleep   | 445  | NULL  | NULL             |
| 22205 | www  | localhost   | hitlist      | Sleep   | 53   | NULL  | NULL             |
| 22206 | www  | localhost   | xaymaca      | Sleep   | 461  | NULL  | NULL             |
| 22209 | www  | localhost   | xaymaca      | Sleep   | 400  | NULL  | NULL             |
| 22227 | www  | localhost   | hitlist      | Sleep   | 86   | NULL  | NULL             |
| 22245 | www  | localhost   | adserver     | Sleep   | 42   | NULL  | NULL             |
| 22262 | www  | localhost   | hitlist      | Sleep   | 184  | NULL  | NULL             |
| 22265 | www  | localhost   | adserver     | Sleep   | 323  | NULL  | NULL             |
| 22287 | www  | localhost   | adserver     | Sleep   | 247  | NULL  | NULL             |
| 22303 | www  | localhost   | hitlist      | Sleep   | 101  | NULL  | NULL             |
| 22311 | www  | localhost   | adserver     | Sleep   | 228  | NULL  | NULL             |
| 22318 | www  | localhost   | adserver     | Sleep   | 97   | NULL  | NULL             |
| 22321 | www  | localhost   | adserver     | Sleep   | 254  | NULL  | NULL             |
| 22334 | www  | localhost   | xaymaca      | Sleep   | 93   | NULL  | NULL             |
| 22353 | www  | localhost   | xaymaca      | Sleep   | 74   | NULL  | NULL             |
| 22395 | www  | localhost   | hitlist      | Sleep   | 209  | NULL  | NULL             |
| 22403 | www  | localhost   | hitlist      | Sleep   | 119  | NULL  | NULL             |
| 22440 | www  | localhost   | xaymaca      | Sleep   | 34   | NULL  | NULL             |
| 22458 | www  | localhost   | adserver     | Sleep   | 178  | NULL  | NULL             |
| 22501 | www  | localhost   | hitlist      | Sleep   | 182  | NULL  | NULL             |
| 22509 | www  | localhost   | hitlist      | Sleep   | 98   | NULL  | NULL             |
| 22632 | www  | localhost   | xaymaca      | Sleep   | 127  | NULL  | NULL             |
| 22731 | www  | localhost   | adserver     | Sleep   | 79   | NULL  | NULL             |
| 30359 | www  | xaymaca.com | hitlist      | Sleep   | 324  | NULL  | NULL             |
| 30371 | www  | xaymaca.com | hitlist      | Sleep   | 1556 | NULL  | NULL             |
| 30377 | www  | xaymaca.com | hitlist      | Sleep   | 1041 | NULL  | NULL             |
| 30380 | www  | xaymaca.com | hitlist      | Sleep   | 56   | NULL  | NULL             |
| 30423 | www  | xaymaca.com | hitlist      | Sleep   | 554  | NULL  | NULL             |
| 30456 | www  | xaymaca.com | hitlist      | Sleep   | 215  | NULL  | NULL             |
| 30470 | www  | xaymaca.com | hitlist      | Sleep   | 28   | NULL  | NULL             |
| 30474 | www  | xaymaca.com | hitlist      | Sleep   | 530  | NULL  | NULL             |
| 30481 | www  | xaymaca.com | hitlist      | Sleep   | 1185 | NULL  | NULL             |
| 30488 | www  | xaymaca.com | hitlist      | Sleep   | 639  | NULL  | NULL             |
| 30510 | www  | xaymaca.com | hitlist      | Sleep   | 408  | NULL  | NULL             |
| 30557 | www  | xaymaca.com | hitlist      | Sleep   | 198  | NULL  | NULL             |
| 30570 | www  | xaymaca.com | hitlist      | Sleep   | 580  | NULL  | NULL             |
| 30576 | www  | xaymaca.com | hitlist      | Sleep   | 82   | NULL  | NULL             |
| 30583 | www  | xaymaca.com | xaymaca      | Sleep   | 1037 | NULL  | NULL             |
| 30586 | www  | xaymaca.com | xaymaca      | Sleep   | 71   | NULL  | NULL             |
| 30589 | www  | xaymaca.com | hitlist      | Sleep   | 267  | NULL  | NULL             |
| 30603 | www  | xaymaca.com | hitlist      | Sleep   | 184  | NULL  | NULL             |
| 30639 | www  | xaymaca.com | hitlist      | Sleep   | 451  | NULL  | NULL             |
| 30667 | www  | xaymaca.com | xaymaca      | Sleep   | 77   | NULL  | NULL             |
| 30669 | www  | xaymaca.com | xaymaca      | Sleep   | 101  | NULL  | NULL             |
| 30717 | www  | xaymaca.com | hitlist      | Sleep   | 351  | NULL  | NULL             |
| 30731 | www  | xaymaca.com | hitlist      | Sleep   | 333  | NULL  | NULL             |
| 30764 | www  | xaymaca.com | hitlist      | Sleep   | 482  | NULL  | NULL             |
| 30796 | www  | xaymaca.com | hitlist      | Sleep   | 134  | NULL  | NULL             |
| 30831 | www  | xaymaca.com | hitlist      | Sleep   | 717  | NULL  | NULL             |
| 30843 | www  | xaymaca.com | hitlist      | Sleep   | 533  | NULL  | NULL             |
| 30892 | www  | xaymaca.com | hitlist      | Sleep   | 166  | NULL  | NULL             |
| 30900 | www  | xaymaca.com | hitlist      | Sleep   | 71   | NULL  | NULL             |
| 30908 | www  | xaymaca.com | xaymaca      | Sleep   | 325  | NULL  | NULL             |
| 30916 | www  | xaymaca.com | hitlist      | Sleep   | 1668 | NULL  | NULL             |
| 30931 | www  | xaymaca.com | hitlist      | Sleep   | 64   | NULL  | NULL             |
| 30940 | www  | xaymaca.com | hitlist      | Sleep   | 20   | NULL  | NULL             |
| 30963 | www  | xaymaca.com | hitlist      | Sleep   | 1461 | NULL  | NULL             |
| 30975 | www  | xaymaca.com | xaymaca      | Sleep   | 121  | NULL  | NULL             |
| 30976 | www  | xaymaca.com | xaymaca      | Sleep   | 1160 | NULL  | NULL             |
| 30992 | www  | xaymaca.com | hitlist      | Sleep   | 705  | NULL  | NULL             |
| 30997 | www  | xaymaca.com | hitlist      | Sleep   | 92   | NULL  | NULL             |
| 31030 | www  | xaymaca.com | xaymaca      | Sleep   | 651  | NULL  | NULL             |
| 31047 | www  | xaymaca.com | xaymaca      | Sleep   | 96   | NULL  | NULL             |
| 31059 | www  | xaymaca.com | hitlist      | Sleep   | 306  | NULL  | NULL             |
| 31084 | www  | xaymaca.com | hitlist      | Sleep   | 162  | NULL  | NULL             |
| 31149 | www  | xaymaca.com | hitlist      | Sleep   | 59   | NULL  | NULL             |
| 31163 | www  | xaymaca.com | hitlist      | Sleep   | 59   | NULL  | NULL             |
| 31268 | www  | xaymaca.com | xaymaca      | Sleep   | 488  | NULL  | NULL             |
| 31367 | www  | xaymaca.com | xaymaca      | Sleep   | 163  | NULL  | NULL             |
| 31474 | www  | xaymaca.com | hitlist      | Sleep   | 241  | NULL  | NULL             |
| 32000 | www  | xaymaca.com | hitlist      | Sleep   | 503  | NULL  | NULL             |
| 32005 | www  | xaymaca.com | hitlist      | Sleep   | 1494 | NULL  | NULL             |
| 32013 | www  | xaymaca.com | xaymaca      | Sleep   | 56   | NULL  | NULL             |
| 37441 | root | localhost   | poe_sessions | Query   | 0    | NULL  | show processlist |
| 37556 | www  | localhost   | adserver     | Sleep   | 72   | NULL  | NULL             |
| 37677 | www  | localhost   | hitlist      | Sleep   | 37   | NULL  | NULL             |
| 37691 | www  | localhost   | forum        | Sleep   | 1    | NULL  | NULL             |
+-------+------+-------------+--------------+---------+------+-------+------------------+
114 rows in set (0.01 sec)

Any ideas on what might be happening?
Thanks.

-- 
Vincent Stoessel - Corporate Accounts, Team Leader 
vince@stripped - 301 847 6548 (direct) 301 847 5082 (fax) 
24-hour Support Line - 301 847 5200 or 1 800 969 9090
Intermedia Communications Business Internet
Thread
Mysql DisconnectionsVincent Stoessel7 Apr
  • Mysql DisconnectionsMichael Widenius10 Apr