Closed PMazarovich closed 2 years ago
Nice, thank you!
Did you test that the memory consumption is lower by using PriorityQueue
or do you only assume it?
I'm still testing it with and without to compare the memory consumption of both variants.
@eht16 , yes, here is 2 graphics, 1 one is Queue, second one - PriorityQueue Tested with this simple code
def pr():
for x in range(0, 1000000):
queue.put("message, message, message, message, message, message, message, message, message")
while not queue.empty():
queue.get()
print(queue.qsize())
pr()
We faced with steady increasing of RAM consumption in AWS ECS and this began to happen after adding python-logstash-async library. There is a known issue about Queue memory leak: https://bugs.python.org/issue43911 The simplest way to get rid of it - change Queue to PriorityQueue