Memory error during SonarScanner execution

We are getting the following error for one of our projects in sonalcloud analysis

Your analysis with ID "AXW-C7nvHmhOcOUjOvdz" has failed: the analysis of your project exceeded the maximum memory available for Automatic Analysis.

  • GitHub
  • Python

It seems our Python analyzer has run out of memory while analyzing the code.

Does this happen regularly for this project on all branches, or does it happen only on some?

It’s happening all the time and on every branch.

The Automatic Analysis feature has 7G memory available to analyze a project. Is your project very large? If it’s not very large, then running out of memory could indicate a bug in our analyzer. Please let us know.

A possible workaround can be to exclude files from the analysis that are suspected to cause the analyzer to run out of memory. Let me know if you’re interested in this option and I’ll send you the list of files in a private thread.

Otherwise, for the time being, the Automatic Analysis service is not suitable for this project, as it doesn’t have enough memory for this analysis. In this case we recommend to try to scan your project using another CI tool.

1 Like

Thank you for your detailed response.

Our project is not very big. I would appreciate if you send me that list of files and we can work through this issue.

Thank you

Hi Janos, I’m following up about the next step to fix this issue.

After some private conversation and investigation, we found out some quite big auto-generated python files were being analyzed and caused out of memory errors.
Excluding those auto-generated files from analysis solved the issue.

1 Like

(A colleague of Niloufar Mazloumpour): We were able to fix the issue by adding the large python files to the sonar exclusions. However, we are having the problem again recently without having added any new large python files.

Error message in sonarQube :point_down:

Your analysis with ID "AXZkECAWUbcSLKUsXj5e" has failed: the analysis of your project exceeded the maximum memory available for Automatic Analysis.

Hi @mcclymont-k,
Looking at the logs, it seems there is still one large python file that is being analyzed.
I’ve contacted you privately to give you more information.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.