Server-wide lines of code total to exceed your 250000 limit

Template for a good bug report, formatted with Markdown:

  • Sonarqube serverVersion: 8.6.0.39681
  • sonar scanner version: sonar-scanner-4.6.0.2311-Linux
  • CFamily plugin version: 6.15.0.25047
  • Jenkins server version: 2.263.1
  • Jenkins agent: via SSH
  • build environment: docker
  • error observed: The last analysis failed because it would have caused your server-wide lines of code total to exceed your 250000 limits but we navigate to Administration → 135,916 lines currently analyzed
  • steps to reproduce: We created the same project with a different key that crossed the 250K threshold. Even though we deleted the duplicated project, the issue still persists.
  • potential workaround: no workaround as of today.

P.S.: use the #bug:fault sub-category if you’re hitting a specific crash/error , or the #bug:fp sub-category for rules-related behaviour

Hi,

Could you provide some more details around this? What does your License page currently show your server-wide LoC at? And when you say “the issue persists” could you describe the circumstances more fully?

 
Ann



Current LOC:135,991.
Our main project total line of code is 129K. We have created a duplicate of the main project, which added another 129,000 lines (total up to 260K) and exceeded the developer subscription threshold ( 250K). we have deleted the duplicate project and it reduced the LOC to ~136K but SonarQube analysis fails because SonarQube indicates we are still exceeding the developer subscription threshold. (Please see the attachments). How can we resolve the issue?

Hi,

So you deleted the duplicate and you’re trying to re-analyze the main project. But it sounds like maybe you didn’t reset the project key back to the original key for the main project. Is that possible?

 
Ann

Hi, I work in the same project. The duplication happened a few month ago, and should not relate to the current issue.

Right now we only have one project, and we changed the project key from “LumPDK” to “lumpdk”. Now when we try to upload new SQ data (with the new key “lumpdk”, I just double checked it), we get the error message:

The last analysis failed because it would have caused your server-wide lines of code total to exceed your 250000 limit.Please contact the instance administrator.

Could it be that SQ is wrongly detecting the whole project as “new code” (which is a feature I have not completely understood)?

Hi @blackliner,

Welcome to the community!

How did you change it? Did you change it in SonarQube before re-analysis?
Selection_999(550)

 
Ann

yes, through the Update Key you showed. I assume if I would not have done that, we would have a second project now (which we don’t)?

Hi,

Well… yes and no. If you hadn’t done it and you’d been successful in reanalyzing then you’d have a second project. But a mismatch between the project key analysis is submitting and the one now stored with the project in SonarQube seems like the prime suspect to me.

Can you double-check that the key analysis is passing matches the one in SonarQube? Add -Dsonar.scanner.dumpToFile=path-to-file to your command line to see the parameters actually being passed.

 
Ann


and this is the log output from SonarQube:

INFO: Project key: lumpdk

I will also run the dumpToFile asap

Hi,

This is maybe a dumb question, but can you make sure there’s no leading/trailing white space in the SonarQube key field?

 
Ann

yes I double checked it. Do we have access to the error log on the client side while uploading?

“The error log on the client side”?

Sorry, I don’t understand.

 
Ann

The error we see on the server (about the 250K lines), why dont we see an error when uploading the data with the sonar scanner cli?

I would hope for some more technical info overall from the system, shouldn’t there be logs on the server with more details about why it failed?

The scanner can’t know that the report it’s sending pushes the server over the license limit.

Ehm… I understand your frustration, but on the face of it the error seems pretty clear.

However, you can access some extra details on the Background Tasks page under each row’s cog menu.

 
Ann

The cog menu shows this:

Hi,

I’m sorry to say that I’m out of ideas. I’ve asked for help internally. Let’s see who else shows up.

 
Ann

Hi,

Have you previously used the community branch plugin?

 
Ann