Deadlock issues related to connection pools are seen in certain cases. The root cause is that connection pools uses multiple locks for the maintenance of pooled connections. Since the pooling function in connection pools is not effective anyways, we might as well disable the pooling function, keep the pool empty, and always get new connections from the pool. This way we do not need to use multiple locks in the connection pool and deadlock is no longer possible.
The pooling function is currently not effective because we never put connections back to the pool and reuse them. 1. xmem and capi nozzles cache the connections they actively use 2. if the active connections go bad, they are discarded and not put back to the pool 3. if replication is restarted (which is probably the main use case the connection pool is designed for), we still cannot reuse the connections since they may contain responses from the previous run. We still need to discard them.