Title: Dev command processes sometimes aren't properly terminated · Issue #2909 · triggerdotdev/trigger.dev · GitHub
Open Graph Title: Dev command processes sometimes aren't properly terminated · Issue #2909 · triggerdotdev/trigger.dev
X Title: Dev command processes sometimes aren't properly terminated · Issue #2909 · triggerdotdev/trigger.dev
Description: Provide environment information System: OS: macOS 15.6 CPU: (16) arm64 Apple M4 Max Memory: 57.43 GB / 128.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 24.7.0 - /opt/homebrew/bin/node npm: 11.5.1 - /opt/homebrew/bin/npm pnpm: 10.27.0 - /U...
Open Graph Description: Provide environment information System: OS: macOS 15.6 CPU: (16) arm64 Apple M4 Max Memory: 57.43 GB / 128.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 24.7.0 - /opt/homebrew/bin/node npm: 11.5.1 - ...
X Description: Provide environment information System: OS: macOS 15.6 CPU: (16) arm64 Apple M4 Max Memory: 57.43 GB / 128.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 24.7.0 - /opt/homebrew/bin/node npm: 11.5.1 - ...
Opengraph URL: https://github.com/triggerdotdev/trigger.dev/issues/2909
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Dev command processes sometimes aren't properly terminated","articleBody":"### Provide environment information\n\n```\nSystem:\n OS: macOS 15.6\n CPU: (16) arm64 Apple M4 Max\n Memory: 57.43 GB / 128.00 GB\n Shell: 5.9 - /bin/zsh\nBinaries:\n Node: 24.7.0 - /opt/homebrew/bin/node\n npm: 11.5.1 - /opt/homebrew/bin/npm\n pnpm: 10.27.0 - /Users/antonioamaralegydiomartins/Developer/repos/terac/platform/node_modules/.bin/pnpm\n bun: 1.3.3 - /Users/antonioamaralegydiomartins/.bun/bin/bun\n```\n\n\n### Describe the bug\n\n\nWhen running `trigger.dev dev` and you need to restart the dev server (Ctrl+C or opening a new terminal), the `trigger-dev-run-worker` child processes from the previous session are not properly terminated. These workers become orphaned zombie processes that continue consuming significant CPU resources (10-25% each), even though they're no longer connected to any active dev session.\n\n**What I expected:** When the parent `trigger.dev dev` process is terminated, all child worker processes should be killed. Starting a new dev session should not leave orphaned workers from previous sessions.\n\n**What actually happens:** Worker processes from old sessions persist indefinitely, accumulating with each restart. After several restarts, I had 34 zombie workers consuming 450%+ combined CPU.\n\n\n### Reproduction repo\n\nNot applicable - this can be reproduced in any project using `trigger.dev dev`. The issue is in the CLI's process cleanup, not project-specific code.\n\n### To reproduce\n\n\n1. Start trigger.dev dev server:\n ```bash\n pnpm dlx trigger.dev@4.3.2 dev\n ```\n\n2. Trigger some tasks (they can be running or completed)\n\n3. Stop the dev server (Ctrl+C) or the terminal becomes unresponsive\n\n4. Open a new terminal and start the dev server again:\n ```bash\n pnpm dlx trigger.dev@4.3.2 dev\n ```\n\n5. Check running processes:\n ```bash\n ps aux | grep trigger-dev-run-worker\n ```\n\n6. **Observe:** Worker processes from the PREVIOUS session are still running as zombies, alongside any new workers from the current session\n\n7. Repeat steps 3-6 multiple times and watch zombie workers accumulate\n\n\n### Additional information\n\n\n### Evidence - Process List (orphaned workers from previous sessions)\n\n```\nPID: 69294 | CPU: 22.8% | MEM: 0.3% | TIME: 3:11.26 | STARTED: 4:54PM\nPID: 70058 | CPU: 20.1% | MEM: 0.3% | TIME: 3:17.06 | STARTED: 4:54PM\nPID: 69698 | CPU: 19.1% | MEM: 0.3% | TIME: 3:04.85 | STARTED: 4:54PM\nPID: 69250 | CPU: 19.0% | MEM: 0.3% | TIME: 3:11.41 | STARTED: 4:54PM\nPID: 76510 | CPU: 18.4% | MEM: 0.3% | TIME: 1:49.24 | STARTED: 4:58PM\nPID: 70131 | CPU: 17.6% | MEM: 0.2% | TIME: 1:27.72 | STARTED: 4:54PM\nPID: 76039 | CPU: 16.6% | MEM: 0.3% | TIME: 1:46.70 | STARTED: 4:58PM\nPID: 68077 | CPU: 15.6% | MEM: 0.3% | TIME: 3:02.45 | STARTED: 4:53PM\nPID: 68205 | CPU: 15.4% | MEM: 0.3% | TIME: 3:18.22 | STARTED: 4:53PM\nPID: 69976 | CPU: 14.0% | MEM: 0.3% | TIME: 3:01.42 | STARTED: 4:54PM\n... (24 more orphaned workers with similar CPU usage)\n```\n\nNote: Workers were started at different times (4:53PM, 4:54PM, 4:58PM) corresponding to different dev server sessions - they accumulated across multiple restarts.\n\n### Workaround\n\n```bash\npkill -f \"trigger-dev-run-worker\"\n```\n\n### Related Issues\n\n- #1609 - Discusses multiple dev instances causing issues (related but different - that's about concurrent sessions, this is about orphaned workers after restart)\n\n### Trigger.dev Version\n\n- CLI: 4.3.2\n- Worker: 20260117.34","author":{"url":"https://github.com/AntonioAEMartins","@type":"Person","name":"AntonioAEMartins"},"datePublished":"2026-01-19T14:25:20Z","url":"https://github.com/triggerdotdev/trigger.dev/issues/2909"}
| react-profiling | 0 |
| react-import-map | react,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-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3db005d0-e3c6-2f04-2f2c-de3c219d9835 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9640:180019:2A760D:3EAF03:6AFADE43 |
| html-safe-nonce | b3124e962e367d7a514b5c597ef61acd9307058c50f97511a8c2648df7b3556a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjQwOjE4MDAxOToyQTc2MEQ6M0VBRjAzOjZBRkFERTQzIiwidmlzaXRvcl9pZCI6IjgwOTQxMzE4Nzk5MDYzMDM1NTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 29ab6fe508a6ac9c0df8d47fc1900056bf2bc525186dec3e485d4e9376bdbf8b |
| hovercard-subject-tag | issue:3829966346 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/triggerdotdev/trigger.dev/2909/issue_layout |
| twitter:image | https://opengraph.githubassets.com/55944b93fa135ebbcb89e43ee79bb6f9f58edced2c112cdac515b3a4e5f58033/triggerdotdev/trigger.dev/issues/2909 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/55944b93fa135ebbcb89e43ee79bb6f9f58edced2c112cdac515b3a4e5f58033/triggerdotdev/trigger.dev/issues/2909 |
| og:image:alt | Provide environment information System: OS: macOS 15.6 CPU: (16) arm64 Apple M4 Max Memory: 57.43 GB / 128.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 24.7.0 - /opt/homebrew/bin/node npm: 11.5.1 - ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | AntonioAEMartins |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9d9bd51a568909a83d1abb9d6f74d68f0c87ca85fe3a56d3f5d70d8b89add9f2 |
| turbo-cache-control | no-preview |
| go-import | github.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git |
| octolytics-dimension-user_id | 95297378 |
| octolytics-dimension-user_login | triggerdotdev |
| octolytics-dimension-repository_id | 572570113 |
| octolytics-dimension-repository_nwo | triggerdotdev/trigger.dev |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 572570113 |
| octolytics-dimension-repository_network_root_nwo | triggerdotdev/trigger.dev |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4a7ae932999cc6d511008dbf980ff9efad2a31f7 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width