René's URL Explorer Experiment


Title: `perf(supervisor): sequential inspect loop in DockerResourceMonitor blocks task scheduling thread` · Issue #3727 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: `perf(supervisor): sequential inspect loop in DockerResourceMonitor blocks task scheduling thread` · Issue #3727 · triggerdotdev/trigger.dev

X Title: `perf(supervisor): sequential inspect loop in DockerResourceMonitor blocks task scheduling thread` · Issue #3727 · triggerdotdev/trigger.dev

Description: Bug Description The DockerResourceMonitor.getNodeResources() method calculates system resource consumption by iterating through all containers. During each iteration, it performs a sequential inspect call to retrieve CPU and memory limit...

Open Graph Description: Bug Description The DockerResourceMonitor.getNodeResources() method calculates system resource consumption by iterating through all containers. During each iteration, it performs a sequential inspe...

X Description: Bug Description The DockerResourceMonitor.getNodeResources() method calculates system resource consumption by iterating through all containers. During each iteration, it performs a sequential inspe...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/issues/3727

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`perf(supervisor): sequential inspect loop in DockerResourceMonitor blocks task scheduling thread`","articleBody":"### Bug Description\nThe `DockerResourceMonitor.getNodeResources()` method calculates system resource consumption by iterating through all containers. During each iteration, it performs a sequential inspect call to retrieve CPU and memory limits:\n\n```typescript\nfor (const container of stats) {\n  if (container.State === \"running\") {\n    const c = this.docker.getContainer(container.Id);\n    const { HostConfig } = await c.inspect(); // Sequential blocking call\n\n    const cpu = this.resourceParser.cpu(HostConfig.NanoCpus ?? 0);\n    const memory = this.resourceParser.memory(HostConfig.Memory ?? 0);\n\n    cpuUsed += cpu;\n    memoryUsed += memory;\n  }\n}\n```\n\nBecause `getNodeResources` is called frequently to make container placement decisions during scheduling, this sequential inspect loop acts as a synchronous bottleneck. On docker hosts running many containers, performing sequential inspect round-trips to the Unix socket blocks the scheduling thread for seconds and creates workload placement latency.\n\n### Root Cause File\n`apps/supervisor/src/resourceMonitor.ts`\n\n### Steps to Reproduce\n1. Start the Trigger.dev supervisor daemon on a machine hosting 50+ active docker containers.\n2. Trigger multiple rapid task scheduling executions (`wouldFit`).\n3. Notice scheduling latency and elevated CPU thread blocking inside the supervisor daemon due to sequential docker socket round-trips.\n\n### Proposed Fix\nUse `Promise.all` to fetch container configurations concurrently rather than sequentially:\n\n```typescript\nconst runningContainers = stats.filter(container => container.State === \"running\");\nconst inspections = await Promise.all(\n  runningContainers.map(async (container) => {\n    const c = this.docker.getContainer(container.Id);\n    const { HostConfig } = await c.inspect();\n    return {\n      cpu: this.resourceParser.cpu(HostConfig.NanoCpus ?? 0),\n      memory: this.resourceParser.memory(HostConfig.Memory ?? 0),\n    };\n  })\n);\n\nfor (const inspect of inspections) {\n  cpuUsed += inspect.cpu;\n  memoryUsed += inspect.memory;\n}\n```","author":{"url":"https://github.com/KanhaiyaBagul","@type":"Person","name":"KanhaiyaBagul"},"datePublished":"2026-05-23T11:10:44Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/3727"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:1c116400-0561-df73-931f-4de57c69d072
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id8C7E:3FAA02:594E9C:8414EF:6AFAEEE4
html-safe-noncea4a6f5c5079148a2c992e14b2d36d387025c6057ac94f680c3f8adeb51e8e048
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QzdFOjNGQUEwMjo1OTRFOUM6ODQxNEVGOjZBRkFFRUU0IiwidmlzaXRvcl9pZCI6IjgxNzc1ODU4NTYxMzE1NTkxNDAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmace222866071946e0b22599ba24f1117cd7f3debb00f277834452fea0fe1a4449b
hovercard-subject-tagissue:4507871876
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/triggerdotdev/trigger.dev/3727/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c19cdf8f3b929678e2671e429d0270ca1dffdb99290a6a55eadc27bf7827beee/triggerdotdev/trigger.dev/issues/3727
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c19cdf8f3b929678e2671e429d0270ca1dffdb99290a6a55eadc27bf7827beee/triggerdotdev/trigger.dev/issues/3727
og:image:altBug Description The DockerResourceMonitor.getNodeResources() method calculates system resource consumption by iterating through all containers. During each iteration, it performs a sequential inspe...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameKanhaiyaBagul
hostnamegithub.com
expected-hostnamegithub.com
None0178036d8230524a18422872393ab7e708443ae4c2047f758560a2db870c1913
turbo-cache-controlno-preview
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
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
release12fff95459b24b0f882a66698ee6a36a5934d247
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/issues/3727#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2F3727
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%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2F3727
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=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/3727
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/3727
Reloadhttps://github.com/triggerdotdev/trigger.dev/issues/3727
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests67 (67)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
https://github.com/triggerdotdev/trigger.dev
New issuehttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/3727
New issuehttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/3727
perf(supervisor): sequential inspect loop in DockerResourceMonitor blocks task scheduling threadhttps://github.com/triggerdotdev/trigger.dev/issues/3727#top
https://github.com/KanhaiyaBagul
KanhaiyaBagulhttps://github.com/KanhaiyaBagul
on May 23, 2026https://github.com/triggerdotdev/trigger.dev/issues/3727#issue-4507871876
Sign up for freehttps://github.com/signup?return_to=https://github.com/triggerdotdev/trigger.dev/issues/3727
Sign in to commenthttps://github.com/login?return_to=https://github.com/triggerdotdev/trigger.dev/issues/3727
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.