-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Labels
Description
Description
payload generate:types completes successfully (writes the output file) but the Node.js process never exits. It continues running at ~88% CPU indefinitely until manually killed.
This appears to be a regression of #13744, which was fixed in PR #13564 and released in v3.56.0.
Reproduction
- Have a Payload 3.73.0 project with
@payloadcms/db-postgresand a non-trivial schema (~19 plugins, ~20+ collections) - Run
payload generate:types - The types file is written correctly and completely
- The process never exits — it stays alive at ~88% CPU
In our case, we observed 4 concurrent generate:types processes (spawned by different build pipelines) all stuck for 40-60+ minutes each, consuming 4 CPU cores on an 8-core server until manually killed.
Evidence it completes successfully
- The output file
payload-types.ts(2,984 lines / 70KB) is written correctly - All types including self-referential relationships (e.g.,
grantedVia?: (string | null) | Share) are generated properly - The process just never calls
process.exit()afterward
Environment
- Payload: 3.73.0
- DB Adapter:
@payloadcms/db-postgres@3.73.0 - Node.js: v20.19.6
- OS: Ubuntu 24.04 (Linux 6.14.0-1017-azure)
- Package manager: pnpm 10.x (monorepo with workspaces)
Expected behavior
payload generate:types should exit with code 0 after writing the types file, as was fixed in #13564.
Related issues
- generate:importmap and generate:types don't have process.exit #13744 — Original report of missing
process.exit()in generate:types/generate:importmap - feat: crons for all bin scripts, new jobs:handle-schedules script, more reliable job system crons #13564 — PR that fixed it in 3.56.0
Reactions are currently unavailable