summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshenjiatong <yshxxsjt715@gmail.com>2020-04-09 18:00:39 +0800
committernorman shen <yshxxsjt715@gmail.com>2020-05-13 04:10:11 +0000
commit96300a32213d1a9bf114b90bef6971d69b839d1d (patch)
treebe5c40ccb64678dda84d417e5a20bf9614bec845
parentc1768401f7a47bd88c044687a00f2e139f1985b4 (diff)
downloadoslo-messaging-96300a32213d1a9bf114b90bef6971d69b839d1d.tar.gz
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
-rw-r--r--oslo_messaging/_drivers/pool.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/oslo_messaging/_drivers/pool.py b/oslo_messaging/_drivers/pool.py
index 774c3ab..d8ae9dd 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