Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cdk deploy: fails with cryptic error if notices request times out #26431

Open
shahinism opened this issue Jul 19, 2023 · 4 comments
Open

cdk deploy: fails with cryptic error if notices request times out #26431

shahinism opened this issue Jul 19, 2023 · 4 comments
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort p2 package/tools Related to AWS CDK Tools or CLI

Comments

@shahinism
Copy link

Describe the bug

When I run cdk deploy, it fails with the following error and exit code 1:

Subprocess exited with error null

No extra information is printed out. However, when I use --verbose it raises the following info:

[13:31:21] outdir: cdk.out
[13:31:21] env: {
  CDK_DEFAULT_REGION: 'us-east-1',
  CDK_DEFAULT_ACCOUNT: 'XXXXXXXXXXX',
  CDK_OUTDIR: 'cdk.out',
  CDK_CLI_ASM_VERSION: '32.0.0',
  CDK_CLI_VERSION: '2.87.0'
}
[13:31:24] Could not refresh notices: Error: Request timed out
Subprocess exited with error null
[13:32:38] Could not refresh notices: Error: Request timed out
[13:32:38] Error: Subprocess exited with error null
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/aws-cdk/lib/index.js:414:50537)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess.emit (node:domain:489:12)

The same stack is able to deployed to other accounts, but for some unknown reason it fails with some others.

Expected Behavior

Deploy normally, or show a more helpful error message.

Current Behavior

Fails with a not helpful message.

Reproduction Steps

I'm not sure how you can reproduce this, without having this stack.

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.87.0

Framework Version

No response

Node.js Version

18.16.1

OS

Amazon Linux 2

Language

Python

Language Version

3.9.0

Other information

No response

@shahinism shahinism added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 19, 2023
@github-actions github-actions bot added the package/tools Related to AWS CDK Tools or CLI label Jul 19, 2023
@peterwoodworth
Copy link
Contributor

Does --notices false unblock?

@peterwoodworth peterwoodworth added p2 effort/small Small work item – less than a day of effort and removed needs-triage This issue or PR still needs to be triaged. labels Jul 19, 2023
@peterwoodworth peterwoodworth changed the title cdk deploy: Subprocess exited with error null cdk deploy: fails with cryptic error if notices request times out Jul 19, 2023
@shahinism
Copy link
Author

shahinism commented Jul 20, 2023

No, the error persists, also when --notices false is enabled:

[05:45:47] outdir: cdk.out
[05:45:47] env: {
  CDK_DEFAULT_REGION: 'us-east-1',
  CDK_DEFAULT_ACCOUNT: 'XXXXXXXXXXX',
  CDK_OUTDIR: 'cdk.out',
  CDK_CLI_ASM_VERSION: '32.0.0',
  CDK_CLI_VERSION: '2.87.0'
}
Subprocess exited with error null
[05:46:11] Error: Subprocess exited with error null
    at ChildProcess.<anonymous> (/usr/local/lib/node_modules/aws-cdk/lib/index.js:414:50537)
    at ChildProcess.emit (node:events:513:28)
    at ChildProcess.emit (node:domain:489:12)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12)

The following is the full command I run now:

cdk deploy --verbose --notices false --require-approval never --all

@shahinism
Copy link
Author

shahinism commented Jul 20, 2023

Well, we managed to resolve this issue by increasing the memory capacity of our CI/CD worker instance from an AWS t3-medium to t3-large. It seems like it was an out-of-memory issue; however, I'm wondering:

  1. Why CDK needs more than 4GB of RAM to function.
  2. Why is such an error not caught before the process is killed?

@nl-brett-stime
Copy link

Try adding an entry in your package.json for the latest version of aws-crt .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/small Small work item – less than a day of effort p2 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

No branches or pull requests

3 participants