Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't reply when we known that client is gone
In case of a broker restart/failover a reply queue can be unreachable for short period the IncomingMessage.send_reply will block for 60 seconds in this case or until rabbit recovers. But in case of the reply queue is unreachable because the rpc client is really gone, we can have a ton of reply to send waiting 60 seconds. This leads to a starvation of connection of the pool The rpc server take to much time to send reply, other rpc client will raise TimeoutError because their don't receive their replies in time. This changes introduces an object cache that stores already known gone client to not wait 60 seconds and hold a connection of the pool Keeping 200 last gone rpc client for 1 minute is enough and doesn't hold to much memory. This also don't raise anymore a frightening exception when we can't send reply to the rpc client. But just logging a info about missing exchange and a warning about unsend reply. Closes-bug: #1460652 Change-Id: I928b30c9b5f9ee007532ff703e136640b0e8aaf4
- Loading branch information
Showing
5 changed files
with
124 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters