cfn-lint using all system memory.
See original GitHub issuecfn-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?
Issue Analytics
- State:
- Created 2 years ago
- Comments:14 (7 by maintainers)
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
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.
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?