question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Please fill out the sections below to help us address your issue.

What issue did you see ? When I call the AWS interface in large numbers, and cannot connect to the corresponding area due to network reasons, an EndpointConnectionError is thrown. As time goes by, the memory occupied by my process will continue to increase, and the maximum observed is currently 6G. Using gc and pyrasite to check, it is found that gc.garbage is [], and the data type that takes up the most memory is str or unicode. The unicode description is the document description of DescribeInstancesRequest in service-2.json. The library versions I use: boto3-1.12.24, botocore-1.15.24, urllib3-1.21.1

Steps to reproduce If you have a runnable example, please include it as a snippet or link to a repository/gist for larger code examples.

Debug logs Full stack trace by adding

import botocore.session
botocore.session.Session().set_debug_logger('')

to your code. image

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:12 (3 by maintainers)

github_iconTop GitHub Comments

10reactions
rl-ilasiccommented, Dec 11, 2020

Is there an update or workaround for this problem?

3reactions
willbengtsoncommented, Aug 20, 2020

I am also tracking down a memory leak. tracemalloc pointed me to https://github.com/boto/botocore/blob/develop/botocore/client.py#L322

When running a Flask application and looping through gc.garbage after a gc.collect() I am left with boto docs. I currently am using boto3 and creating clients as client = boto3.client('sts') as an example.

Running in lambda the following is a graph of memory from cloudwatch metrics filter:

image

Read more comments on GitHub >

github_iconTop Results From Across the Web

Memory leak - Wikipedia
In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations in...
Read more >
What is Memory Leak? How can we avoid? - GeeksforGeeks
Memory leak occurs when programmers create a memory in heap and forget to delete it. The consequences of memory leak is that it...
Read more >
Definition of memory leak - PCMag
When memory is allocated, but not deallocated, a memory leak occurs (the memory has leaked out of the computer). If too many memory...
Read more >
Memory Leaks and Garbage Collection | Computerworld
DEFINITION A memory leak is the gradual deterioration of system performance that occurs over time as the result of the fragmentation of a...
Read more >
Find a memory leak - Windows drivers - Microsoft Learn
A memory leak occurs when a process allocates memory from the paged or nonpaged pools, but doesn't free the memory.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found