0

I have an RDS Mysql instance with a reader and a writer. A while ago I set up a scheduled event, which copies the contents of information_schema.processlist to a log table, adding a timestamp. Now I notice what seems like a strange discrepancy:

enter image description here

This graphs shows that there were on average ~2000 connections for some time between 13:20 and 15:30. However, the results from the process-log table show that there never was more than 741 processes connected:

mysql> select tstmp,count(*) from prochist where tstmp between '2021-05-31 13:20' and '2021-05-31 15:30' group by tstmp;
+---------------------+----------+
| tstmp               | count(*) |
+---------------------+----------+
| 2021-05-31 13:22:28 |      741 |
| 2021-05-31 13:27:28 |      712 |
| 2021-05-31 13:32:28 |      678 |
| 2021-05-31 13:37:28 |      617 |
| 2021-05-31 13:42:28 |      740 |
| 2021-05-31 13:47:28 |      734 |
| 2021-05-31 13:52:28 |      733 |
| 2021-05-31 13:57:28 |      729 |
| 2021-05-31 14:02:28 |      728 |
| 2021-05-31 14:07:28 |      723 |
| 2021-05-31 14:12:28 |      487 |
| 2021-05-31 14:17:28 |      474 |
| 2021-05-31 14:22:28 |      487 |
| 2021-05-31 14:27:28 |      482 |
| 2021-05-31 14:32:28 |      473 |
| 2021-05-31 14:37:28 |      467 |
| 2021-05-31 14:42:28 |      459 |
| 2021-05-31 14:47:28 |      447 |
| 2021-05-31 14:52:28 |      565 |
| 2021-05-31 14:57:28 |      569 |
| 2021-05-31 15:02:28 |      580 |
| 2021-05-31 15:07:28 |      580 |
| 2021-05-31 15:12:28 |      580 |
| 2021-05-31 15:17:28 |      581 |
| 2021-05-31 15:22:28 |      434 |
| 2021-05-31 15:27:28 |      430 |
+---------------------+----------+
26 rows in set (0.73 sec)

So, what is it actually the graphs shows? The monitoring on the client side (a Jetty application) shows that there are occasional connection failures, but only a few - maybe 10 per day.

Another question, actually: the nature of the application is such that the number of connections should vary quite smoothly - so what could cause those wil jumps from ~500 to ~2000 almost from one moment to the next? Again, there is no indication that the application is doing anything weird.

1
  • What causes an entry to be added to prochist? I suspect it is missing come connections that go away before they can be caught. – Rick James Jun 9 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.