Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

python 2下aliyun-python-sdk-core存在内存泄漏 #543

Copy link
Copy link

Description

@yichinzhu
Issue body actions

版本:>= 2.13.33
Python版本: 已验证2.7 存在问题,3.6不存在问题

验证代码

# pip2 install objgraph aliyun-python-sdk-core==2.15.2 aliyun-python-sdk-ecs

from aliyunsdkcore.client import AcsClient
from aliyunsdkecs.request.v20140526.DescribeRegionsRequest import DescribeRegionsRequest
import gc
import objgraph
import traceback

def main():
    client = AcsClient("{ak}", "{sk}", "cn-beijing")
    request = DescribeRegionsRequest()
    request.set_accept_format('json')
    response = client.do_action_with_exception(request)


if __name__ == '__main__':
    cnt = 1
    while True:
        try:
            main()
        except Exception as e:
            traceback.print_exc()
        gc.collect()
        if cnt == 1 or cnt % 100 == 0:
            objgraph.show_growth(limit = 100)
        if cnt % 10 == 0:
            print(cnt)
        cnt += 1
Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

Morty Proxy This is a proxified and sanitized view of the page, visit original site.