Sonar cloud Analysis is started failing due to timeout issue

Hello Team

We’re running a sonar cloud scan with our Bitbucket cloud repository and all of sudden from last week we are now getting the below error message :
Your analysis with ID “AX93vt2oe4reLBj2O9hj” took too long and reached our timeout. Please try to scan your project using another CI tool. See troubleshooting documentation https://sonarcloud.io/documentation/analysis/troubleshooting/#automatic-analysis-timeout
In the error details we can see below message only
Error Message
Task exceeded the timeout of 2100 seconds

Please refer to the Getting Started guide for your code repository (GitHub, Bitbucket Cloud, Azure DevOps, GitLab) and try to scan your project using another CI tool.

And above errror is also interminent some times analysis is working but most of the times it is failing since last week.

We are building .net framework code using SonarScanner.MSBuild.exe via Jenkins pipeline.

Is there any other way we can find more logs about this timeout or Any help to fix this issue would be welcome here.

Thanks

Hi @dpadhya . Could you please tell me when the analysis was executed? I’ve tried between 01 and 13 of March but could not find it. If is too old, we could not have it in the logs anymore, so if you can provide a recent one would be better!

Thanks Alexandre for reply, we are doing analysis on each PR to Master so mostly it happen at least 4-5 times in a day, following are the recent analysis ID also attached screenshot for reference.
AX-NSBwP6fMFjmbKopfC
AX-NPek4scrWDXT8fs9J ( This analysis was successful)
AX-NCrUWDWY2wrQIPGCG
AX-M4c4hUVDa_hfwc321
AX-MTmikDWY2wrQIPDBH
AX-HYEWULj_oMlsUjmHt

Hi @dpadhya , my apologies for the late reply.

By any chance, is there a special day when the tasks started to fail, while they were working before ?

I see that 1 analysis succeeded on March 15th, so I would suggest a few ideas:

  • If a given rule a generating a lot of issues, you can try disabling it and trying again
  • If some file(s) have a lot of issues, excluding them from the analysis and trying again

In both cases, I would be very interested, if it has an impact of the success of the tasks, about what you did, which rules you disabled or which kind of files to excluded (number of lines, generated code, file related to a given framework…).

Regards,
Claire

Thanks Claire Villard for responding, Analysis started failing since 4th March 2022, there is no error as such which i could find. so i am not sure here file rules or file we have to exclude from analysis. i can see only this message “Task exceeded the timeout of 2100 seconds” is there any ways to get more logs ?

Regards
Dushyant Padhya

Thanks for your answer.

My message was not clear, no error will be visible on your side.
During the investigation, I noticed that the error could come from a huge number of Issues found by SonarCloud.
Looking at your project Issues page could help you find some files which have a particularly high number of issues in them, or a given rule that is producing a high number of issues (let’s say, several hundred or thousand) on the special case of your project.
Disabling those rules or excluding those files could make the analysis faster and then solve the timeout error.

Thanks Claire Villard for your reply, will check on this and get back to you.

1 Like

Hello @dpadhya

Did you have a chance to check about Claire’s suggestion? Are you still getting errors?

I am experiencing a similar issue. I have a copy of the Sonar Way Java quality profile because I need to deactivate certain rules. I last copied it in 12-21. I just took a new copy and one of the 16 new rules is causing my sonar analysis to go from a couple of minutes to an hour. I’m working on isolating which rules.

Welcome back to the community @jseletz !

Thanks for letting me know you are experiencing the same issue. I’ll be waiting for your results to see if you are still getting errors.

Apparently I’m hitting this issue due to a new Java analyzer: [URGENT] Analyzing functions never stops

@jseletz do you have the same symptoms described in that thread? If yes, was your issue solved following some of the suggestions mentioned in there?

Hi Claire Villard and Aura Herrera Solis, apologies for delay in reply, i did tried excluding some rules but it didnt worked, we are still getting same issue

Yes, I’m all set, thanks

1 Like

Hello @dpadhya !

Thanks for letting me know that excluding some rules didn’t work. Have you tried what Claire suggested about looking for the project Issues to find the files with a particular high number of issues to exclude them?

Other than that, if it still times out after excluding those files, could you please let us know about this new analysis in less than 10 days after running it so we can review it internally?