GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — fix(dev): stop max listeners exceeded warning messages when running more than 10 runs concurrently by ericallam · Pull Request #2771 · triggerdotdev/trigger.dev Conversation
|
🦋 Changeset detectedLatest commit: 5ad2f53 The changes in this PR will be included in the next version bump. This PR includes changesets to release 26 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Caution Review failedThe pull request is closed. WalkthroughSIGTERM handling for graceful shutdown was centralized in DevSupervisor: a SIGTERM handler is added that stops all active DevRunController instances and awaits their completion with Promise.allSettled; the handler is registered at initialization and removed on shutdown. Corresponding per-controller SIGTERM handling was removed from DevRunController (constructor registration, private sigterm method, and cleanup in stop). A changeset entry was added documenting a patch fix for "max listeners exceeded" warnings when running >10 concurrent runs. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
packages/cli-v3/src/dev/devSupervisor.ts (1)
141-143: Centralized SIGTERM handling inDevSupervisorlooks correct and should fix the max listeners warnings.Registering a single
process.on("SIGTERM", this.#handleSigterm)ininit()and removing it inshutdown()avoids per‑run listeners and the associatedMaxListenersExceededWarning, while#handleSigtermcorrectly iterates allrunControllersand stops them concurrently withPromise.allSettled.Two small, non‑blocking refinements you might consider:
- Log rejected results from
Promise.allSettledso unexpected failures incontroller.stop()are visible in dev logs.- Optionally guard against re‑entrancy (e.g., if multiple SIGTERMs arrive) with a simple flag so you don’t trigger multiple global stop sequences in parallel, though this is mostly defensive.
Overall, the lifecycle and cleanup behavior here looks sound.
Also applies to: 148-156, 159-159
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
.changeset/fuzzy-ghosts-admire.md (1 hunks)packages/cli-v3/src/dev/devSupervisor.ts (1 hunks)packages/cli-v3/src/entryPoints/dev-run-controller.ts (0 hunks)📄 CodeRabbit inference engine (.github/copilot-instructions.md)
**/*.{ts,tsx}: Use types over interfaces for TypeScript
Avoid using enums; prefer string unions or const objects instead
Files:
packages/cli-v3/src/dev/devSupervisor.ts📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Use function declarations instead of default exports
Files:
packages/cli-v3/src/dev/devSupervisor.ts📄 CodeRabbit inference engine (AGENTS.md)
Format code using Prettier
Files:
packages/cli-v3/src/dev/devSupervisor.tsLearnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 2593
File: packages/core/src/v3/workers/warmStartClient.ts:168-170
Timestamp: 2025-10-08T11:48:12.327Z
Learning: The trigger.dev runners execute only in Node 21 and 22 environments, so modern Node.js APIs like AbortSignal.any (introduced in v20.3.0) are supported.
Learnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 2593
File: packages/core/src/v3/workers/warmStartClient.ts:168-170
Timestamp: 2025-10-08T11:48:12.327Z
Learning: The trigger.dev runners execute only in Node 21 and 22 environments, so modern Node.js APIs like AbortSignal.any (introduced in v20.3.0) are supported.
Applied to files:
.changeset/fuzzy-ghosts-admire.mdLearnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Run `npx trigger.devlatest dev` to start the Trigger.dev development server
Applied to files:
.changeset/fuzzy-ghosts-admire.mdLearnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Control concurrency using the `queue` property with `concurrencyLimit` option
Applied to files:
.changeset/fuzzy-ghosts-admire.mdLearnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `runs.subscribeToBatch()` to subscribe to changes for all runs in a batch
Applied to files:
.changeset/fuzzy-ghosts-admire.mdLearnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Limit task duration using the `maxDuration` property (in seconds)
Applied to files:
.changeset/fuzzy-ghosts-admire.mdLearnt from: CR
Repo: triggerdotdev/trigger.dev PR: 0
File: .cursor/rules/writing-tasks.mdc:0-0
Timestamp: 2025-11-27T16:27:35.304Z
Learning: Applies to **/trigger/**/*.{ts,tsx,js,jsx} : Use `batch.trigger()` to trigger multiple different tasks at once from backend code
Applied to files:
.changeset/fuzzy-ghosts-admire.mdLearnt from: nicktrn
Repo: triggerdotdev/trigger.dev PR: 1418
File: packages/core/src/v3/errors.ts:364-371
Timestamp: 2024-10-18T15:41:52.352Z
Learning: In `packages/core/src/v3/errors.ts`, within the `taskRunErrorEnhancer` function, `error.message` is always defined, so it's safe to directly call `error.message.includes("SIGTERM")` without additional checks.
Applied to files:
packages/cli-v3/src/dev/devSupervisor.ts.changeset/fuzzy-ghosts-admire.md (1)
1-5: Changeset metadata and summary look consistent with the code change.The package name, bump type, and description clearly match the intent of centralizing SIGTERM handling to avoid max listeners warnings; nothing else to change here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ore than 10 runs concurrently
ea23888 to
5ad2f53
Compare
There was an error while loading. Please reload this page.
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## [email protected] ### Minor Changes - feat(cli): deterministic image builds for deployments ([#2778](#2778)) - feat(cli): enable zstd compression for deployment images ([#2773](#2773)) ### Patch Changes - The new `triggeredVia` field is now populated in deployments via the CLI. ([#2767](#2767)) - fix(dev): stop max listeners exceeded warning messages when running more than 10 runs concurrently ([#2771](#2771)) - Upgrade @modelcontextprotocol/sdk to 1.24.3 ([#2768](#2768)) - Updated dependencies: - `@trigger.dev/[email protected]` - `@trigger.dev/[email protected]` - `@trigger.dev/[email protected]` ## @trigger.dev/[email protected] ### Minor Changes - feat(cli): deterministic image builds for deployments ([#2778](#2778)) ### Patch Changes - The new `triggeredVia` field is now populated in deployments via the CLI. ([#2767](#2767)) ## @trigger.dev/[email protected] ### Patch Changes - Updated dependencies: - `@trigger.dev/[email protected]` ## @trigger.dev/[email protected] ### Patch Changes - Updated dependencies: - `@trigger.dev/[email protected]` - `@trigger.dev/[email protected]` - `@trigger.dev/[email protected]` ## @trigger.dev/[email protected] ### Patch Changes - Updated dependencies: - `@trigger.dev/[email protected]` ## @trigger.dev/[email protected] ### Patch Changes - Updated dependencies: - `@trigger.dev/[email protected]` ## @trigger.dev/[email protected] ### Patch Changes - Updated dependencies: - `@trigger.dev/[email protected]` ## @trigger.dev/[email protected] ### Patch Changes - Updated dependencies: - `@trigger.dev/[email protected]` ## @trigger.dev/[email protected] ### Patch Changes - Updated dependencies: - `@trigger.dev/[email protected]` --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## [email protected] ### Minor Changes - feat(cli): deterministic image builds for deployments ([#2778](#2778)) - feat(cli): enable zstd compression for deployment images ([#2773](#2773)) ### Patch Changes - The new `triggeredVia` field is now populated in deployments via the CLI. ([#2767](#2767)) - fix(dev): stop max listeners exceeded warning messages when running more than 10 runs concurrently ([#2771](#2771)) - Upgrade @modelcontextprotocol/sdk to 1.24.3 ([#2768](#2768)) - Updated dependencies: - `@trigger.dev/[email protected]` - `@trigger.dev/[email protected]` - `@trigger.dev/[email protected]` ## @trigger.dev/[email protected] ### Minor Changes - feat(cli): deterministic image builds for deployments ([#2778](#2778)) ### Patch Changes - The new `triggeredVia` field is now populated in deployments via the CLI. ([#2767](#2767)) ## @trigger.dev/[email protected] ### Patch Changes - Updated dependencies: - `@trigger.dev/[email protected]` ## @trigger.dev/[email protected] ### Patch Changes - Updated dependencies: - `@trigger.dev/[email protected]` - `@trigger.dev/[email protected]` - `@trigger.dev/[email protected]` ## @trigger.dev/[email protected] ### Patch Changes - Updated dependencies: - `@trigger.dev/[email protected]` ## @trigger.dev/[email protected] ### Patch Changes - Updated dependencies: - `@trigger.dev/[email protected]` ## @trigger.dev/[email protected] ### Patch Changes - Updated dependencies: - `@trigger.dev/[email protected]` ## @trigger.dev/[email protected] ### Patch Changes - Updated dependencies: - `@trigger.dev/[email protected]` ## @trigger.dev/[email protected] ### Patch Changes - Updated dependencies: - `@trigger.dev/[email protected]` --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.