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 commit96300a3221
) (cherry picked from commit39f770f55b
) (cherry picked from commit1613b7a968
) (cherry picked from commitfd795bbb8f
)
This commit is contained in:
parent
41a7da012e
commit
171132ff69
|
@ -100,6 +100,10 @@ class Pool(object):
|
||||||
self._current_size += 1
|
self._current_size += 1
|
||||||
break
|
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)
|
wait_condition(self._cond)
|
||||||
|
|
||||||
# We've grabbed a slot and dropped the lock, now do the creation
|
# We've grabbed a slot and dropped the lock, now do the creation
|
||||||
|
|
Loading…
Reference in New Issue