-
-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak #34
Comments
I'm seeing this as well, and had to remove the watchtower handler to keep our servers alive |
I checked the snippet above with Python 2.7.6 and latest When using queues ( Without using queues ( Upon investigation, it seems that the issue is related to This seems to be confirmed by doing manual garbage collection after pushing logs to CloudWatch:
When using queues |
According to this: boto/botocore#1246 (comment) To avoid memory leaks using botocore/boto3, the idea is to create one session per thread. Currently this package creates a single session that is being used by every thread. This is causing this issue apparently. It is the recommendation from AWS as well. |
Is this still an issue? I was about to use this package with for some clients but if it has memory leaks still like those shown above as their services tend to run a long time without restarting and that sort of memory burn rate will drain resources too quickly |
I have not experienced problems related to this, but my service is small in comparison to others. According to this opened issue the problem with botocore still persists: boto/boto3#1670 |
We use watchtower in production and do not observe any memory leaks. Also, watchtower does not share boto3 clients across threads unless explicitly passed a configuration that forces it to do so. I am going to close this issue for now. When I run the reproduction script above, it stabilizes at a steady state memory consumption of 60MB. Network outages and associated retries may temporarily increase this footprint. If somebody has a specific concern, please post a complete reproduction and an explanation of why it is different from what you expect. |
We have been noticing a memory leak with watchtower for long running processes.
Logs are being delivered to Cloudwatch but memory usage keeps going up.
Python version 2.7.10 and watchtower 0.3.3
Snippet of code to reproduce
The text was updated successfully, but these errors were encountered: