René's URL Explorer Experiment


Title: TLS/SSL asyncio leaks memory · Issue #109534 · python/cpython · GitHub

Open Graph Title: TLS/SSL asyncio leaks memory · Issue #109534 · python/cpython

X Title: TLS/SSL asyncio leaks memory · Issue #109534 · python/cpython

Description: Bug report Bug description: python3.9 without uvloop doesn't leaks memory (or noticeably smaller). python3.11+ (and others?) leaks memory A LOT under load (with or without uvloop) - up to +2gb per every test! test commands: ab -n50000 -c...

Open Graph Description: Bug report Bug description: python3.9 without uvloop doesn't leaks memory (or noticeably smaller). python3.11+ (and others?) leaks memory A LOT under load (with or without uvloop) - up to +2gb per ...

X Description: Bug report Bug description: python3.9 without uvloop doesn't leaks memory (or noticeably smaller). python3.11+ (and others?) leaks memory A LOT under load (with or without uvloop) - up to +2gb ...

Opengraph URL: https://github.com/python/cpython/issues/109534

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"TLS/SSL asyncio leaks memory ","articleBody":"# Bug report\r\n\r\n### Bug description:\r\n\r\npython3.9 without uvloop doesn't leaks memory (or noticeably smaller). \r\npython3.11+ (and others?) leaks memory A LOT under load (with or without uvloop) - up to +2gb per every test!\r\n\r\ntest commands: \r\nab -n50000 -c15000 -r https://127.0.0.1/\r\n(apt install apache2-utils)\r\n\r\n```python\r\nimport asyncio, ssl, uvloop\r\n\r\nclass HTTP(asyncio.Protocol):\r\n    \r\n    def __init__(self):\r\n        self.transport = None\r\n        \r\n    def connection_made(self, transport):\r\n        self.transport = transport\r\n\r\n    def data_received(self, data):\r\n        self.transport.write(\r\n            b'HTTP/1.1 200 OK\\r\\nContent-Length: 0\\r\\nConnection: keep-alive\\r\\n\\r\\n'\r\n        )\r\n        self.transport.close()\r\n        \r\ndef make_tls_context():\r\n    ctx = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)\r\n    ctx.load_cert_chain('cert.crt', 'cert.key')\r\n    return ctx\r\n\r\ntls_context = make_tls_context()\r\nloop = uvloop.new_event_loop()\r\n\r\nasync def start_server(loop):\r\n    return await loop.create_server(\r\n        HTTP, '127.0.0.1', 443, backlog=65535,\r\n        ssl=tls_context)\r\n\r\nloop.run_until_complete(start_server(loop))\r\nloop.run_forever()\r\n```\r\n### CPython versions tested on:\r\n\r\n3.9, 3.11, 3.12\r\n\r\n### Operating systems tested on:\r\n\r\nDebian Linux\r\n\r\n\u003c!-- gh-linked-prs -->\r\n### Linked PRs\r\n* gh-113338\r\n* gh-114074\r\n* gh-114311\r\n* gh-114367\r\n* gh-114829\r\n* gh-114830\r\n* gh-115643\r\n\u003c!-- /gh-linked-prs -->\r\n","author":{"url":"https://github.com/rojamit","@type":"Person","name":"rojamit"},"datePublished":"2023-09-18T11:49:46Z","url":"https://github.com/python/cpython/issues/109534"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:705ad84b-6fd0-a77b-0802-1f9332ea8359
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idBF8A:2E9293:181AED:201155:6AFE9552
html-safe-nonce47045b2e9f62a57369720502d757a1dfeb7dd53f45723ba38a343e8e99a864bc
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjhBOjJFOTI5MzoxODFBRUQ6MjAxMTU1OjZBRkU5NTUyIiwidmlzaXRvcl9pZCI6IjE4MDYxNDczMzAxNzMyMTE5ODYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacafc2292afab3d468a615e996cf4ec326e2666028dbdaa84b2e8989475c4153c7
hovercard-subject-tagissue:1900764543
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/109534/issue_layout
twitter:imagehttps://opengraph.githubassets.com/6320a5bf23c45b3839f4c3c28ddb430bac00e85f7b623bf9125f038fc763658e/python/cpython/issues/109534
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6320a5bf23c45b3839f4c3c28ddb430bac00e85f7b623bf9125f038fc763658e/python/cpython/issues/109534
og:image:altBug report Bug description: python3.9 without uvloop doesn't leaks memory (or noticeably smaller). python3.11+ (and others?) leaks memory A LOT under load (with or without uvloop) - up to +2gb per ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamerojamit
hostnamegithub.com
expected-hostnamegithub.com
Noneb3c0f155eafc27e60db6e254d1ffff0e072e9ab3b4018a5ee518797c19d89f86
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release4a10310af51a1bfffbedc4fd81cb582acf0cb0ff
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/cpython/issues/109534#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F109534
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F109534
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/109534
Reloadhttps://github.com/python/cpython/issues/109534
Reloadhttps://github.com/python/cpython/issues/109534
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
https://github.com/python/cpython
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/109534
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/109534
TLS/SSL asyncio leaks memory https://github.com/python/cpython/issues/109534#top
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
performancePerformance or resource usagehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22performance%22
topic-asynciohttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-asyncio%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/rojamit
rojamithttps://github.com/rojamit
on Sep 18, 2023https://github.com/python/cpython/issues/109534#issue-1900764543
https://127.0.0.1/https://127.0.0.1/
gh-109534: Asyncio sslproto memleak #113338https://github.com/python/cpython/pull/113338
gh-109534: fix reference leak when SSL handshake fails #114074https://github.com/python/cpython/pull/114074
gh-109534: switch from sock_call to sock_call_ex in sock_send #114311https://github.com/python/cpython/pull/114311
pythongh-109534: close transport if waiter is done #114367https://github.com/python/cpython/pull/114367
[3.12] gh-109534: fix reference leak when SSL handshake fails (GH-114074) #114829https://github.com/python/cpython/pull/114829
[3.11] gh-109534: fix reference leak when SSL handshake fails (GH-114074) #114830https://github.com/python/cpython/pull/114830
pythongh-109534: get rid of bytearray as class member #115643https://github.com/python/cpython/pull/115643
Nexthttps://github.com/python/cpython/issues/109534?timeline_page=1
rojamithttps://github.com/rojamit
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
on Sep 18, 2023https://github.com/python/cpython/issues/109534#event-10396915915
https://github.com/selevit
selevithttps://github.com/selevit
on Nov 17, 2023https://github.com/python/cpython/issues/109534#issuecomment-1815786668
arhadthedevhttps://github.com/arhadthedev
performancePerformance or resource usagehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22performance%22
topic-asynciohttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-asyncio%22
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
on Nov 18, 2023https://github.com/python/cpython/issues/109534#event-11002347813
github-project-automationhttps://github.com/apps/github-project-automation
asynciohttps://github.com/orgs/python/projects/29
on Nov 18, 2023https://github.com/python/cpython/issues/109534#event-14890617481
github-project-automationhttps://github.com/apps/github-project-automation
asynciohttps://github.com/orgs/python/projects/29
on Nov 18, 2023https://github.com/python/cpython/issues/109534
https://github.com/arhadthedev
arhadthedevhttps://github.com/arhadthedev
on Nov 18, 2023https://github.com/python/cpython/issues/109534#issuecomment-1817606166
@1st1https://github.com/1st1
@asvetlovhttps://github.com/asvetlov
@graingerthttps://github.com/graingert
@gvanrossumhttps://github.com/gvanrossum
@kumaraditya303https://github.com/kumaraditya303
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Nov 18, 2023https://github.com/python/cpython/issues/109534#issuecomment-1817626233
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Nov 18, 2023https://github.com/python/cpython/issues/109534#issuecomment-1817626384
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Nov 18, 2023https://github.com/python/cpython/issues/109534#issuecomment-1817626639
https://github.com/selevit
selevithttps://github.com/selevit
on Nov 19, 2023https://github.com/python/cpython/issues/109534#issuecomment-1817771587
asyncio: potential leak of TLS connections #106684https://github.com/python/cpython/issues/106684
Memory leak with Python 3.11.2 aio-libs/aiohttp#7252https://github.com/aio-libs/aiohttp/issues/7252
https://github.com/selevit
selevithttps://github.com/selevit
on Nov 19, 2023https://github.com/python/cpython/issues/109534#issuecomment-1817774557
this comment to the aiohttp bug mentioned abovehttps://github.com/aio-libs/aiohttp/issues/7252#issuecomment-1516030373
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on Nov 19, 2023https://github.com/python/cpython/issues/109534#issuecomment-1817886979
https://github.com/Faolain
Faolainhttps://github.com/Faolain
on Nov 27, 2023https://github.com/python/cpython/issues/109534#issuecomment-1828494988
Kludex/uvicorn#2078https://github.com/Kludex/uvicorn/discussions/2078
https://github.com/Besedo/memory_issue/tree/mainhttps://github.com/Besedo/memory_issue/tree/main
@EBazarovhttps://github.com/EBazarov
https://github.com/gyula-lakatos
gyula-lakatoshttps://github.com/gyula-lakatos
on Jul 2, 2024https://github.com/python/cpython/issues/109534#issuecomment-2202070704
https://github.com/fifdee
fifdeehttps://github.com/fifdee
on Jul 3, 2024https://github.com/python/cpython/issues/109534#issuecomment-2205759025
https://private-user-images.githubusercontent.com/87128868/345387546-455ae6e9-d989-4f87-bcea-2eafeff891dd.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTUwNjk1NjcsIm5iZiI6MTc5NTA2OTI2NywicGF0aCI6Ii84NzEyODg2OC8zNDUzODc1NDYtNDU1YWU2ZTktZDk4OS00Zjg3LWJjZWEtMmVhZmVmZjg5MWRkLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjExMTklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYxMTE5VDA2MjEwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU5MGYzMGZjZWQxOWQ0MDA5NjlmMzY0MDkwNTIwNzUwNTljZGM3MjQ4Nzg0NmExYTA3NGYwNWNkNDYzOTQ3OTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9._gSiGJZV1yzfRNKVSTMtlNpb9AmZC5lYaaG-ecMpw-M
https://github.com/nikumar1206
nikumar1206https://github.com/nikumar1206
on Sep 29, 2024https://github.com/python/cpython/issues/109534#issuecomment-2381402679
https://github.com/stalkerg
stalkerghttps://github.com/stalkerg
on Oct 7, 2024https://github.com/python/cpython/issues/109534#issuecomment-2395790291
@nikumar1206https://github.com/nikumar1206
https://sourceware.org/pipermail/libc-help/2024-October/006791.htmlhttps://sourceware.org/pipermail/libc-help/2024-October/006791.html
https://github.com/geraldog
geraldoghttps://github.com/geraldog
on Oct 7, 2024https://github.com/python/cpython/issues/109534#issuecomment-2395813485
@stalkerghttps://github.com/stalkerg
https://github.com/1st1
1st1https://github.com/1st1
on Oct 8, 2024https://github.com/python/cpython/issues/109534#issuecomment-2400529093
@fantixhttps://github.com/fantix
https://github.com/CodeToFreedom
CodeToFreedomhttps://github.com/CodeToFreedom
on Feb 21, 2025https://github.com/python/cpython/issues/109534#issuecomment-2674402314
https://github.com/geraldog
geraldoghttps://github.com/geraldog
on Feb 22, 2025https://github.com/python/cpython/issues/109534#issuecomment-2676060030
https://github.com/CodeToFreedom
CodeToFreedomhttps://github.com/CodeToFreedom
on Feb 22, 2025https://github.com/python/cpython/issues/109534#issuecomment-2676325669
@geraldoghttps://github.com/geraldog
https://github.com/geraldog
geraldoghttps://github.com/geraldog
on Feb 22, 2025https://github.com/python/cpython/issues/109534#issuecomment-2676398693
https://github.com/Eclips4
Eclips4https://github.com/Eclips4
on Mar 11, 2025https://github.com/python/cpython/issues/109534#issuecomment-2713836560
@geraldoghttps://github.com/geraldog
https://github.com/geraldog
geraldoghttps://github.com/geraldog
on Mar 11, 2025https://github.com/python/cpython/issues/109534#issuecomment-2715364324
@Eclips4https://github.com/Eclips4
@stalkerghttps://github.com/stalkerg
https://github.com/Eclips4
Eclips4https://github.com/Eclips4
on Mar 12, 2025https://github.com/python/cpython/issues/109534#issuecomment-2717557015
@geraldoghttps://github.com/geraldog
Eclips4https://github.com/Eclips4
not plannedhttps://github.com/python/cpython/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Anot-planned
on Mar 12, 2025https://github.com/python/cpython/issues/109534#event-16710853632
github-project-automationhttps://github.com/apps/github-project-automation
asynciohttps://github.com/orgs/python/projects/29
on Mar 12, 2025https://github.com/python/cpython/issues/109534
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/cpython/issues/109534
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/cpython/issues/109534
extension-modulesC modules in the Modules dirhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22extension-modules%22
performancePerformance or resource usagehttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22performance%22
topic-asynciohttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22topic-asyncio%22
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
asynciohttps://github.com/orgs/python/projects/29
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.