From 171132ff69bb0edcc0ebe1044ae59d1a6d572fd3 Mon Sep 17 00:00:00 2001 From: shenjiatong Date: Thu, 9 Apr 2020 18:00:39 +0800 Subject: [PATCH] Print warning message when connection running out I believe when connection pool running out of available resources, there will be all kinds of weird consequences following. So let's print warning logs when we are going to waiting indefinitely for the lock Change-Id: I5ca930cada523bc77c644703a0f02b9160816231 Related-bug: #1871813 (cherry picked from commit 96300a32213d1a9bf114b90bef6971d69b839d1d) (cherry picked from commit 39f770f55b3331b7a99b3ea42a34982a20635cf2) (cherry picked from commit 1613b7a968f33ef7dc683d05fde05be0c458c8fc) (cherry picked from commit fd795bbb8f5aaa740fa810f2248646f6ec3a211e) --- oslo_messaging/_drivers/pool.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/oslo_messaging/_drivers/pool.py b/oslo_messaging/_drivers/pool.py index 774c3ab34..d8ae9ddff 100644 --- a/oslo_messaging/_drivers/pool.py +++ b/oslo_messaging/_drivers/pool.py @@ -100,6 +100,10 @@ class Pool(object): self._current_size += 1 break + LOG.warning("Connection pool limit exceeded: " + "current size %s surpasses max " + "configured rpc_conn_pool_size %s", + self._current_size, self._max_size) wait_condition(self._cond) # We've grabbed a slot and dropped the lock, now do the creation