René's URL Explorer Experiment


Title: Celery integration leaking file descriptors · Issue #5422 · getsentry/sentry-python · GitHub

Open Graph Title: Celery integration leaking file descriptors · Issue #5422 · getsentry/sentry-python

X Title: Celery integration leaking file descriptors · Issue #5422 · getsentry/sentry-python

Description: How do you use Sentry? Sentry Saas (sentry.io) Version 2.51.0 Steps to Reproduce After upgrading to Python 3.14, our Celery tasks started failing with 'too many open files' errors. We found that Sentry's Celery integration leaks a file d...

Open Graph Description: How do you use Sentry? Sentry Saas (sentry.io) Version 2.51.0 Steps to Reproduce After upgrading to Python 3.14, our Celery tasks started failing with 'too many open files' errors. We found that Se...

X Description: How do you use Sentry? Sentry Saas (sentry.io) Version 2.51.0 Steps to Reproduce After upgrading to Python 3.14, our Celery tasks started failing with 'too many open files' errors. We found...

Opengraph URL: https://github.com/getsentry/sentry-python/issues/5422

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Celery integration leaking file descriptors","articleBody":"### How do you use Sentry?\n\nSentry Saas (sentry.io)\n\n### Version\n\n2.51.0\n\n### Steps to Reproduce\n\nAfter upgrading to Python 3.14, our Celery tasks started failing with 'too many open files' errors. We found that\n- Sentry's Celery integration leaks a file descriptor for every task executed\n- Python 3.14's [new GC](https://docs.python.org/3/whatsnew/3.14.html#whatsnew314-incremental-gc) is less aggressive and leaked file descriptors can hang around for much longer\n\nThe relevant code is: https://github.com/getsentry/sentry-python/blob/bf0a683137015c9e866782fd87a785addf1f1da8/sentry_sdk/integrations/celery/__init__.py#L394-L398\n\nAccessing the `transport` property will create a new redis connection. (We use a redis broker but I assume the behavior is the same for other transport types.) This connection is never closed so it's left to the GC to clean up.\n\nTo see this in action, take the \"add\" example from https://docs.sentry.io/platforms/python/integrations/celery/, configure a redis broker and change the main function to queue many tasks:\n```\ndef main():\n    for _ in range(1000):\n        add.delay(4, 4)\n````\nUse Python 3.14, `celery[redis]==5.6.2`, `sentry-sdk==2.51.0`. Then check `/proc/(worker pid)/fd/`.\n\n### Expected Result\n\nThe Celery worker has few open files.\n\n### Actual Result\n\nThe Celery worker has hundreds of `anon_inode:[eventpoll]` files.","author":{"url":"https://github.com/pdewacht","@type":"Person","name":"pdewacht"},"datePublished":"2026-02-04T14:26:15Z","url":"https://github.com/getsentry/sentry-python/issues/5422"}

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:f9a345bc-835e-252b-64fd-cb6cd52e1738
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA694:2978F1:9483C7:C16794:6B00E068
html-safe-nonce9ac848e56d4b46d4e0d6b5df68f2e794aa7d38847e04ff0083c082d2b655408b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjk0OjI5NzhGMTo5NDgzQzc6QzE2Nzk0OjZCMDBFMDY4IiwidmlzaXRvcl9pZCI6IjYzNjAwNjI3NTI4MTk1Njg3NDQiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac51823475e8a4c6c74ed3f21683c855402bbcdfc221913ae1e555152f274dd960
hovercard-subject-tagissue:3896819801
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/getsentry/sentry-python/5422/issue_layout
twitter:imagehttps://opengraph.githubassets.com/0a37e9324f3fd947400973797eadcd4b8b2e1e43c403a59d736df6457d59006b/getsentry/sentry-python/issues/5422
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0a37e9324f3fd947400973797eadcd4b8b2e1e43c403a59d736df6457d59006b/getsentry/sentry-python/issues/5422
og:image:altHow do you use Sentry? Sentry Saas (sentry.io) Version 2.51.0 Steps to Reproduce After upgrading to Python 3.14, our Celery tasks started failing with 'too many open files' errors. We found that Se...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepdewacht
hostnamegithub.com
expected-hostnamegithub.com
None043c3f30fbcbe2c6c8e729e10cbbbc90c406546f9fbbb67c648d38f6b7d16daf
turbo-cache-controlno-preview
go-importgithub.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id137814779
octolytics-dimension-repository_nwogetsentry/sentry-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id137814779
octolytics-dimension-repository_network_root_nwogetsentry/sentry-python
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
release5425dc24e8bd8d6fca9641a12afc984825a43875
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/getsentry/sentry-python/issues/5422#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fissues%2F5422
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%2Fgetsentry%2Fsentry-python%2Fissues%2F5422
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=getsentry%2Fsentry-python
Reloadhttps://github.com/getsentry/sentry-python/issues/5422
Reloadhttps://github.com/getsentry/sentry-python/issues/5422
Reloadhttps://github.com/getsentry/sentry-python/issues/5422
getsentryhttps://github.com/getsentry
sentry-pythonhttps://github.com/getsentry/sentry-python
Codehttps://github.com/getsentry/sentry-python
Issues345 (345)https://github.com/getsentry/sentry-python/issues
Pull requests42 (42)https://github.com/getsentry/sentry-python/pulls
Discussionshttps://github.com/getsentry/sentry-python/discussions
Actionshttps://github.com/getsentry/sentry-python/actions
Security and quality2 (2)https://github.com/getsentry/sentry-python/security
Insightshttps://github.com/getsentry/sentry-python/insights
https://github.com/getsentry/sentry-python
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-python/issues/5422
New issuehttps://github.com/login?return_to=https://github.com/getsentry/sentry-python/issues/5422
#5427https://github.com/getsentry/sentry-python/pull/5427
Celery integration leaking file descriptorshttps://github.com/getsentry/sentry-python/issues/5422#top
#5427https://github.com/getsentry/sentry-python/pull/5427
https://github.com/sentrivana
Bughttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Bug%22
Integration: Celeryhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Integration%3A%20Celery%22
PythonSDKhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Python%22
https://github.com/pdewacht
pdewachthttps://github.com/pdewacht
on Feb 4, 2026https://github.com/getsentry/sentry-python/issues/5422#issue-3896819801
new GChttps://docs.python.org/3/whatsnew/3.14.html#whatsnew314-incremental-gc
sentry-python/sentry_sdk/integrations/celery/__init__.pyhttps://github.com/getsentry/sentry-python/blob/bf0a683137015c9e866782fd87a785addf1f1da8/sentry_sdk/integrations/celery/__init__.py#L394-L398
bf0a683https://github.com/getsentry/sentry-python/commit/bf0a683137015c9e866782fd87a785addf1f1da8
https://docs.sentry.io/platforms/python/integrations/celery/https://docs.sentry.io/platforms/python/integrations/celery/
pdewachthttps://github.com/pdewacht
PythonSDKhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Python%22
Bughttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Bug%22
on Feb 4, 2026https://github.com/getsentry/sentry-python/issues/5422#event-22530354901
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Feb 4, 2026https://github.com/getsentry/sentry-python/issues/5422#event-22530356272
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Feb 4, 2026https://github.com/getsentry/sentry-python/issues/5422#event-22530358620
https://github.com/apps/linear
linearhttps://github.com/apps/linear
on Feb 4, 2026https://github.com/getsentry/sentry-python/issues/5422#issuecomment-3847778269
Linearhttps://linear.app
PY-2067https://linear.app/getsentry/issue/PY-2067/celery-integration-leaking-file-descriptors
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Feb 4, 2026https://github.com/getsentry/sentry-python/issues/5422
https://github.com/alexander-alderman-webb
alexander-alderman-webbhttps://github.com/alexander-alderman-webb
on Feb 4, 2026https://github.com/getsentry/sentry-python/issues/5422#issuecomment-3847788933
@pdewachthttps://github.com/pdewacht
getsantryhttps://github.com/apps/getsantry
Waiting for: Product Ownerhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Waiting%20for%3A%20Product%20Owner%22
on Feb 4, 2026https://github.com/getsentry/sentry-python/issues/5422#event-22530412953
getsantryhttps://github.com/apps/getsantry
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
on Feb 4, 2026https://github.com/getsentry/sentry-python/issues/5422
sentrivanahttps://github.com/sentrivana
Integration: Celeryhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Integration%3A%20Celery%22
on Feb 5, 2026https://github.com/getsentry/sentry-python/issues/5422#event-22552383070
sentrivanahttps://github.com/sentrivana
on Feb 5, 2026https://github.com/getsentry/sentry-python/issues/5422#event-22553667727
https://github.com/sentrivana
sentrivanahttps://github.com/sentrivana
on Feb 6, 2026https://github.com/getsentry/sentry-python/issues/5422#issuecomment-3858844490
fix for that herehttps://github.com/getsentry/sentry-python/pull/5427
#5428https://github.com/getsentry/sentry-python/issues/5428
sentrivanahttps://github.com/sentrivana
completedhttps://github.com/getsentry/sentry-python/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
#5427https://github.com/getsentry/sentry-python/pull/5427
on Feb 6, 2026https://github.com/getsentry/sentry-python/issues/5422#event-22583240130
pullhttps://github.com/apps/pull
on Feb 6, 2026https://github.com/getsentry/sentry-python/issues/5422#event-22588892356
fix(celery): Close the connection we're reading driver_type from (get…https://github.com/AKJUS/sentry-python/commit/1ab6e3d6354a42d77c9b4a561603299d4d1aae00
get…https://github.com/getsentry/sentry-python/pull/5427
1ab6e3dhttps://github.com/AKJUS/sentry-python/commit/1ab6e3d6354a42d77c9b4a561603299d4d1aae00
Sign up for freehttps://github.com/signup?return_to=https://github.com/getsentry/sentry-python/issues/5422
Sign in to commenthttps://github.com/login?return_to=https://github.com/getsentry/sentry-python/issues/5422
sentrivanahttps://github.com/sentrivana
Bughttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Bug%22
Integration: Celeryhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Integration%3A%20Celery%22
PythonSDKhttps://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3A%22Python%22
GitHub Issues with 👀 3https://github.com/orgs/getsentry/projects/227
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.