0

In my application I need to monitor list of process ids for some database user, so I execute SHOW PROCESSLIST command to get information. The problem is that sometimes some Id dissapears from command output but it comes back on next execution. For me it seems like a bug, what cause this strange behaviour?

Example:

1934,1935,1936,1937,1938
1934,1935,1936,1937,1938
1934,1935,1936,1937,1938
1934,1935,1936,1938
1934,1935,1936,1937,1938

Version:

MariaDB [db_w1]> select @@version;
+-----------------+
| @@version       |
+-----------------+
| 10.1.24-MariaDB |
+-----------------+
1 row in set (0.00 sec)
  • what are you trying to do with the process list? Kill connections of? If so this can just specify a user in the kill comand. – danblack Sep 25 '18 at 19:56
  • Is "connection pooling" turned on? – Rick James Oct 11 '18 at 4:09
0

Processes, in the MySQL PROCESS LIST, are representations of connections from outside the server. A mysql -h {host} will create a client connection. They are transient in that, if a client disconnects, the server process no longer exists.

As such a process showing in a process list can no longer be there on subsequent access if the connection was disconnected from the client.

| improve this answer | |
  • Could you expand on this a bit more, so the OP can understand the implications of this (and why it would reappear)? – RDFozz Sep 25 '18 at 20:19

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.