question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cfn-lint using all system memory.

See original GitHub issue

cfn-lint version: (cfn-lint --version) 0.58.0 (windows python 3.9.9 x64)

Description of issue.

This is not an issue with the linting process itself, that works fine, but with the linter in general.

I have a fairly complex conditions block. It contains 24 iterations of the following, 6 equals with a FindInMap for the left compare and an AND containing a EQUALS with REF for the left compare and an OR referencing the 6 equals conditions already described before. There is also a different OR condition referencing 3 other OR conditions. each of the 3 other ORs reference, between them all, the 24 iterations first mentioned here.

In addition to the conditions section, the resource section has a resource for each of the 24 iteration conditions defined in the conditions section. Each of these are conditionally created. Of the resources property, one of them is a list that each list member has its own IF based on one of the 6 equals with FindInMaps

The problem I run into is cfn-lint will allocate so much system memory that my system will hand for 1-5 minutes and sometimes i have to hard reset it due to other processes not being able to get access to memory. We’re talking 20GB to 52GB utilization; my system has 64GB. I find the higher utilizations occur when cfn-lint is called from from ATOM via the atom-cfn-lint plugin.

Is there a way to limit memory usage? If not, a feature request would be to add functionality to limit memory usage?

conditions snippet mapping snippet resource snippet taskmgr snippet

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
SchnitzelKopfcommented, Sep 26, 2022

I’m experiencing this issue on an AWS workspace via VSCode - when we save a file, multiple cfn-lint processes kick off using around 400mb ram each. Leads to thrashing on the system. observed both on v0.61.0 and v0.64.1 installed via pip. What info can I give to help debug?

This is VERY annoying, as it is also happening on my local computer! Feels like every code change triggers another instance of cfn-lint. Or pressing CTRL + S. I am running Version 0.65.1 image

Edit + Workaround: Seems like the VS Code Extension “CloudFormation Linter” is causing the described behavior. When switching to “Serverless IDE”, which also offers linting via cfn-lint, linting won’t be triggered constantly by typing.

1reaction
rheathcote-deloittecommented, Sep 13, 2022

I’m experiencing this issue on an AWS workspace via VSCode - when we save a file, multiple cfn-lint processes kick off using around 400mb ram each. Leads to thrashing on the system. observed both on v0.61.0 and v0.64.1 installed via pip. What info can I give to help debug?

Read more comments on GitHub >

github_iconTop Results From Across the Web

cfn-lint - npm
cfn -lint is a tool used to improve your CloudFormation development cycle. If you are here, you are probably fed up of waiting...
Read more >
Do you know how to make function of cfn-lint fine with Visual ...
I use Visual Studio Code to create CloudFormation template. To detect error in CloudFormation YAML template, I used cfn-lint.
Read more >
AWS CloudFormation best practices
The cfn-lint tool gives you the ability to validate your CloudFormation templates ... By exporting the resources, you allow all stacks with public...
Read more >
Using cfn-lint to validate your CloudFormation template
MemorySize of 3000 is invalid. Lambda memory size can range from 128 MB to 3008 MB in 64 MB increments. Condition IsTracingActive is...
Read more >
CFN Lint: AWS CloudFormation Linter - Morioh
or by using wildcards (globbing):. Lint all yaml files in path : cfn-lint path/*.yaml. Lint all yaml files in path and all subdirectories...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found