0

When running the SonarQube Maven plugin to get blame information from an RTC project I am hitting a timeout. I tried changing the repository.timeout property in .jazz-scm/preferences.properties to 900 but the timeout still shows as 60000ms.

At this point I'm not sure whether this is lscm timing out or Sonar itself.

The error:

[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-
plugin:3.0.2:sonar (default-cli) on project app: The jazz annotate command 
[sh lscm annotate -u pviana@foo.com -P ******** pom.xml] timed out: 
Timeout exceeded: 60000 ms [command: sh lscm annotate -u pviana@foo.com 
-P ******** pom.xml]: TimeoutException -> [Help 1]
MisterStrickland
  • 947
  • 1
  • 15
  • 35
  • What happens if you run the lscm command manually in a shell? Any reason why it is taking so much time? – Julien H. - SonarSource Team Dec 08 '16 at 07:50
  • Yes. I created a wrapper around `lscm` with a locking mechanism to run it in parallel. I have around 8 projects being analyzed at a time, so whenever a file is too big I hit this timeout issue. I understand this is a performance problem, but I have no problem increasing the timeout and waiting longer if that's an option. Is it possible to increase the timeout in this situation? – MisterStrickland Dec 08 '16 at 16:36

1 Answers1

1

The timeout is currently hardcoded to 60s. Feel free to submit a pull request to make it configurable. But still I think that spending more than 1 min to blame a single file probably reveal a performance issue.

  • I will look at that, thanks Julien. It may be a performance issue, but like I said I'm running 8+ lscm commands in parallel, and there's this one particular project that typically fails with a timeout. FYI: I don't see the issue when I run the analysis against that particular project only (no parallel lscms), so I'm assuming it's a performance issue caused by parallelism. – MisterStrickland Dec 09 '16 at 15:28
  • I also get timeout errors quite often, though not always. I am not explicitly asking for parallel lscm commands, but I do not know whether sonar-maven-plugin may parallelise it on its own. I have made sure lscm uses the native command "fec". If there is a performance problem, it is an issue with scmtools themselves. Perhaps one solution could be to use lscm login and logout to avoid this overhead in every command invocation? I also believe the timeout should be configurable, and the maximum parallel commands, if they run in parallel. – Juan Aug 02 '17 at 08:33
  • 1
    Another functionality which could help would be to be able to configure the analyser to treat these timeout errors (or lscm annotate errors in general) as warnings. Actually, if you try to run lscm annotate with a non-IBM JVM, it fails with error code 1, and that is treated as a warning, not an error, what I personally find quite incoherent. – Juan Aug 03 '17 at 07:58
  • I agree to treat timeout exceptions as warnings. Plugin is waiting for a maintainer, do you volunteer? :) – Julien H. - SonarSource Team Aug 04 '17 at 09:23