# My project scanning time got increased suddenly with huge time difference

**URL:** <https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907>\
**Category:** SonarQube Server / Community Build\
**Created:** [November 4, 2020, 2:41am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907 "2020-11-04T02:41:41Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Palugula\_Sunil](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/palugula_sunil/32/15974_2.png) [@Palugula\_Sunil](https://community.sonarsource.com/u/Palugula_Sunil)\
**Post date:** [November 4, 2020, 2:41am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/1 "2020-11-04T02:41:41Z")

</div>

Hi @Joe

As said by you i have created new topic and assume you already have the log so i am not attaching the log here.

## **History from previous Topic**

I have a java projects and it has few subprojects in it and scanning this project used to take nearly 8 hours but from few days it has increased to 12-13 hours. Please let me know how we can find sudden increase in the scan time? How can identify where exactly the scan time got increased?

Our Sonar server version is 7.4 and we use Sonar Maven plugin for scanning our java project.

Note: We are already in process of upgrading our sonar to LTS version.

Also please let us know the inputs for decreasing my scan timing.

* * *

Thanks,  
Sunil Palugula

---

<div class="post-metadata">

**Author:** ![ganncamp](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ganncamp/32/1261_2.png) [@ganncamp](https://community.sonarsource.com/u/ganncamp)\
**Post date:** [November 4, 2020, 4:50pm UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/2 "2020-11-04T16:50:24Z")

</div>

Hi Sunil,

We don’t generally have assignees for people/threads/posts, so it’s best to

- not invoke (@) people who haven’t already interacted in your thread
- provide or link to all the context in each thread

Without your logs, it’s difficult for me to comment on your situation, but what I can say is that 7.4 is too old to expect effective help. If this problem persists once you’ve upgraded please do come back to us. In that case, enabling debug logging during analysis will help identify which steps are taking more time than they should.

&nbsp;  
Ann

---

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [November 5, 2020, 2:36am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/5 "2020-11-05T02:36:50Z")

</div>

Hi @Palugula_Sunil!

Apologies again for unlisting the other thread, let’s continue here now. I’m still reviewing your logs (its huge, just like you mentioned).

Can you please answer these questions for me in the meantime?

1. Are you using SonarQube 7.4 Community Edition or Developer Edition or Enterprise Edition?
2. Is there any reason or obstacle that is blocking you from being to upgrade to SonarQube 7.9 LTS? We have a lot of bug fixes and optimization improvements. Can you try a testing your build locally on SonarQube 7.9 and see if that changes your scan time? Please post the logs here or send me a link to it with debug/verbose mode.
3. When you get a chance, I highly suggest upgrading your maven build tool to 3.6.3. Can you try upgrade maven and reattempt as well?

Will respond again once I review your initial 12hr log.

Joe

---

<div class="post-metadata">

**Author:** ![Palugula\_Sunil](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/palugula_sunil/32/15974_2.png) [@Palugula\_Sunil](https://community.sonarsource.com/u/Palugula_Sunil)\
**Post date:** [November 5, 2020, 4:23am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/6 "2020-11-05T04:23:36Z")

</div>

> [@ganncamp](#):
>
> Without your logs, it’s difficult for me to comment on your situation, but what I can say is that 7.4 is too old to expect effective help. If this problem persists once you’ve upgraded please do come back to us. In that case, enabling debug logging during analysis will help identify which steps are taking more time than they should.

I apologize for specially tagging people directly but as instructed by Joe in other unlisted thread i have directly tagged him.

But still noted your instructions below.

- not invoke (@) people who haven’t already interacted in your thread
- provide or link to all the context in each thread

Thanks,  
Sunil Palugula

---

<div class="post-metadata">

**Author:** ![Palugula\_Sunil](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/palugula_sunil/32/15974_2.png) [@Palugula\_Sunil](https://community.sonarsource.com/u/Palugula_Sunil)\
**Post date:** [November 5, 2020, 4:27am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/7 "2020-11-05T04:27:16Z")

</div>

> [@Joe](#):
>
> Can you please answer these questions for me in the meantime?
> 
> 1. Are you using SonarQube 7.4 Community Edition or Developer Edition or Enterprise Edition?
> 2. Is there any reason or obstacle that is blocking you from being to upgrade to SonarQube 7.9 LTS? We have a lot of bug fixes and optimization improvements. Can you try a testing your build locally on SonarQube 7.9 and see if that changes your scan time? Please post the logs here or send me a link to it with debug/verbose mode.
> 3. When you get a chance, I highly suggest upgrading your maven build tool to 3.6.3. Can you try upgrade maven and reattempt as well?

Hi @Joe

See below for my answers.

1. This is my sonar version - Community Edition Version 7.4 (build 18908)
2. I am planning to upgrade but it will take some time, Can you please confirm ig you want me to install sonar 7.9 in my local and then do the scan?
3. I will upgrade maven with our current sonar and let you know

Thanks,  
Sunil Palugula

---

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [November 5, 2020, 9:06am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/8 "2020-11-05T09:06:11Z")

</div>

Thank you for the answers. Yes, please download SonarQube 7.9 locally and run your maven build and sonar:sonar command against it. This way you do not need to upgrade your public SonarQube.

---

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [November 6, 2020, 4:39am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/9 "2020-11-06T04:39:28Z")

</div>

Hi @Palugula_Sunil,

Small update on my analysis your logs for the ~9hr run. Here are my observations:

- I noticed that you are using the latest SonarScanner for Maven 3.7.0.1746, which is good.

- Total mvn build and scan to completion is \<12hr (25-Oct-2020 13:33 to 26-Oct-2020 1:22ish).

- V3 product module alone takes ~9hr!

- The actual sonar analysis scan starts around `25-Oct-2020 16:17:06`, so that’s about 2hr 45min from the start of your `mvn` command.

- Possibly need to fix your node installation to prevent this error:

- Over 1hr 10min of nothing happening while it runs the FindBugs sensor, very strange, you may want to remove this plugin or upgrade it and check again:

- At around `25-Oct-2020 20:07:20`, it takes about \<5hr to process 25 files. This part alone takes about 4hr 48min. The bulk of that time occurs in the `build	25-Oct-2020 22:26:31	[DEBUG] 22:26:31.436 Process file src/com/vitechinc/v3/enrollment/view/components/CoverageInfoComponent.java`. Is this file large in terms of lines of code or complexity?

I still want to emphasize that you continue your test on your local environment with SonarQube 7.9, upgrade the plugins within SonarQube 7.9, and upgrade Maven. After you run this test, please link or show the debug logs from your scanner.

Joe

EDIT: For your reading enjoyment, I also highly suggest you read through the [Release Upgrade Notes](https://docs.sonarqube.org/latest/setup/upgrade-notes/) to see any regressions or improvements that you should be aware of.

---

<div class="post-metadata">

**Author:** ![Palugula\_Sunil](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/palugula_sunil/32/15974_2.png) [@Palugula\_Sunil](https://community.sonarsource.com/u/Palugula_Sunil)\
**Post date:** [November 6, 2020, 5:23am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/10 "2020-11-06T05:23:15Z")

</div>

Hi @Joe

I dont have enough resources to run the build on my local but i have another sonar server with version **Community Edition Version 8.0 (build 29455)** there are also we can see that time of build is same version 7.4. Do you think will it makes difference if we run scan with 7.9?

Thanks,  
Sunil Palugula

---

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [November 6, 2020, 5:54am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/11 "2020-11-06T05:54:44Z")

</div>

Hey @Palugula_Sunil,

No, I don’t think that will make much of a difference, but let’s try a few things to get an idea of what to do next:

- Please check my observations from earlier and see if you agree with them.
- FindBugs plugin sensor doesn’t look correct. Please remove or upgrqde it.
- In this file `src/com/vitechinc/v3/enrollment/view/components/CoverageInfoComponent.java`, is this file complex or has lots of lines of code? Can you compare your logs with earlier scans that were quicker and see if something changed in this file?
  - Try excluding that one `CoverageInfoComponent.java` file from analysis and running a scan and see how much faster it is, just for testing purposes. Then if it is much faster, then we can focus on why this specific file causes an issue.

- Try breaking out your massive, multi-module Maven project into separate project scans.
- Please upgrade all your plugins in the Marketplace in Sonarqube 8.0 (or 7.4) and compare.
- Finally, please try upgrading to 8.5.1 (our latest version) and see if the results change. There have been many improvements that can help. Here are our [Upgrade Notes](https://docs.sonarqube.org/latest/setup/upgrading/) and [Release Notes](https://docs.sonarqube.org/latest/setup/upgrade-notes/) that you should read before doing the upgrade.

A combination of the above suggestions should help us hone in on the problem. I’ll continue to review the logs. If you choose one thing to do, I suggest doing the upgrade to 8.5.1 (plugins upgraded), running the scan, and get debug logs to show.

Joe

---

<div class="post-metadata">

**Author:** ![Palugula\_Sunil](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/palugula_sunil/32/15974_2.png) [@Palugula\_Sunil](https://community.sonarsource.com/u/Palugula_Sunil)\
**Post date:** [November 13, 2020, 3:47am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/12 "2020-11-13T03:47:01Z")

</div>

Hi @Joe

Sorry for the delayed response.

- I cannot remove findbugs plugin since our DEV team is interested in scanning using findbugs
- This file src/com/vitechinc/v3/enrollment/view/components/CoverageInfoComponent.java has only 2300 lines of code, I dont have logs from our CI server to compare but i have verified this file and i dont see lot changes happened to this file recently.
- Noted i will exclude this file from scan on the upgraded test region but it takes some time.
- I will upgrade our sonar server and will scan the project and let you know the timings but it will take few more days.

I will update you with debug logs as soon as we are done with scanning the project on upgraded version. Thanks once again for your help.

Thanks,  
Sunil Palugula

---

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [November 13, 2020, 4:33am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/13 "2020-11-13T04:33:37Z")

</div>

Hi @Palugula_Sunil!

No worries, I have as much time as you need to help you. I hope I can be as quick and speedy as you in replying.

- I suggest upgrading the Findbugs plugin or filing an issue [here](https://github.com/spotbugs/sonar-findbugs/issues) if you continue to get errors after upgrading the plugin.
- Thank you for checking that `CoverageInfoComponent.java` file. Hopefully the upgrade will prove we won’t need to inspect this file any deeper.
- Great! I hope the exclusion works to prove that is the culprit (on your old SonarQube) and that your upgrade to the new SonarQube 8.5.1 (with the file included now) fixes it.

I will await the logs (if any!).

Joe

---

<div class="post-metadata">

**Author:** ![Palugula\_Sunil](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/palugula_sunil/32/15974_2.png) [@Palugula\_Sunil](https://community.sonarsource.com/u/Palugula_Sunil)\
**Post date:** [December 14, 2020, 5:18am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/14 "2020-12-14T05:18:50Z")

</div>

Hi @Joe

Sorry for the delayed response, I have upgraded our SonarQA server to SonarQube 8.5.1 and the time was not reduced even after the upgrade but it got reduced from 12 hours to 5 hours if we run scan on machine which good amount of resources…

Thanks,  
Sunil Palugula

---

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [December 17, 2020, 4:41am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/15 "2020-12-17T04:41:16Z")

</div>

Hi @Palugula_Sunil!

Thank you for providing an update. That is good news that it was reduced! Are scans consistently around 5 hours? Did you exclude `src/com/vitechinc/v3/enrollment/view/components/CoverageInfoComponent.java` file? Try excluding it and running it again.

By the way, you should go ahead and try upgrading to SonarQube 8.6, which was released just last Friday. Please try our latest version and exclude that file again and see what happens. Please post your maven debug logs (-X) also or send it to me privately.

Joe

---

<div class="post-metadata">

**Author:** ![Palugula\_Sunil](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/palugula_sunil/32/15974_2.png) [@Palugula\_Sunil](https://community.sonarsource.com/u/Palugula_Sunil)\
**Post date:** [December 18, 2020, 8:12am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/16 "2020-12-18T08:12:18Z")

</div>

Hi @Joe

I did not exclude any file, After using the machine with high resource time got reduced to 5 hours consistently.

Sure i will upgrade our sonar to 8.6 and let you know the scan time but need some time for upgrade

Thanks,  
Sunil Palugula

---

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [May 6, 2021, 4:26am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/17 "2021-05-06T04:26:55Z")

</div>

Hi @Palugula_Sunil,

SonarSource has just released [SonarQube 8.9](https://www.sonarqube.org/downloads/) and a nice [blog post on how to upgrade/prepare for it](https://blog.sonarsource.com/sonarqube-lts-89-upgrade).

If you have some time, can you try upgrading and testing your project on it? I also suggest removing/disabling FindBugs plugin temporarily so you can see what your analysis looks like “naked”.

Joe

---

<div class="post-metadata">

**Author:** ![Palugula\_Sunil](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/palugula_sunil/32/15974_2.png) [@Palugula\_Sunil](https://community.sonarsource.com/u/Palugula_Sunil)\
**Post date:** [May 7, 2021, 3:59am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/18 "2021-05-07T03:59:03Z")

</div>

Thanks for providing the blog, I have already started my upgrade on our staging region and facing upgrade issues.

currently we are on Community Edition Version 7.4 since we cannot upgrade directly to 8.9, We are proceeding with below approach.

1. upgrade Community Edition Version 7.4 to Community Edition Version 7.9.5
2. Once above is completed then upgrade 7.9.5 to 8.9.0

But unfortunately when we are trying to upgrade from 7.4 to 7.9.5 we are not able to bring up the sonar after upgrade. Seeing below issue in the logs.

```
    2021.05.06 23:31:05 WARN web[][o.s.p.ProcessEntryPoint] Fail to start web
java.lang.IllegalArgumentException: Unable to create shared memory : 
	at org.sonar.process.sharedmemoryfile.AllProcessesCommands.<init>(AllProcessesCommands.java:103)
	at org.sonar.process.sharedmemoryfile.DefaultProcessCommands.<init>(DefaultProcessCommands.java:34)
	at org.sonar.process.sharedmemoryfile.DefaultProcessCommands.secondary(DefaultProcessCommands.java:52)
	at org.sonar.server.app.WebServer.isOperational(WebServer.java:69)
	at org.sonar.server.app.WebServer.getStatus(WebServer.java:61)
	at org.sonar.process.ProcessEntryPoint.waitForStatus(ProcessEntryPoint.java:121)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:104)
	at org.sonar.process.ProcessEntryPoint.launch(ProcessEntryPoint.java:81)
	at org.sonar.server.app.WebServer.main(WebServer.java:99)
Caused by: java.io.FileNotFoundException: /u01/sonarqube-7.9.5/temp/sharedmemory (Too many open files in system)
	at java.base/java.io.RandomAccessFile.open0(Native Method)
	at java.base/java.io.RandomAccessFile.open(RandomAccessFile.java:345)
	at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:259)
	at java.base/java.io.RandomAccessFile.<init>(RandomAccessFile.java:214)
	at org.sonar.process.sharedmemoryfile.AllProcessesCommands.<init>(AllProcessesCommands.java:100)
	... 8 common frames omitted
2021.05.06 23:31:05 INFO web[][o.s.p.ProcessEntryPoint] Hard stopping process

```

I have also attached full logs for your reference, can you please help me in moving forward with this upgrade.

Note: I have tried all the solutions removing /u01/sonarqube-7.9.5/temp/sharedmemory followed by restart but still see the same issue.

Our DB version is Postgres 9.6.1 and which is compatible with 7.9.5 and 8.9

Thanks,  
Sunil Palugula[es.log](https://community.sonarsource.com/uploads/short-url/ugG2nxvlBVjIjxn8S0e2J8vV2A6.log) (3.8 KB) [sonar.log](https://community.sonarsource.com/uploads/short-url/5KZQOvySCdRsbBDJ94exmHdg49p.log) (2.6 KB) [web.log](https://community.sonarsource.com/uploads/short-url/sUjEM6XtXmbc5I8ucKGylSRR9tH.log) (6.4 KB)

---

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [May 7, 2021, 4:07am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/19 "2021-05-07T04:07:55Z")

</div>

> [@Palugula\_Sunil](#):
>
> `Too many open files in system`

Hi @Palugula_Sunil ,

Please check these 4 parameters as listed here: [https://docs.sonarqube.org/7.9/requirements/requirements/#header-6](https://docs.sonarqube.org/7.9/requirements/requirements/#header-6)

> If you’re running on Linux, you must ensure that:
> 
> - vm.max\_map\_count is greater or equals to 262144
> - fs.file-max is greater or equals to 65536
> - the user running SonarQube can open at least 65536 file descriptors
> - the user running SonarQube can open at least 4096 threads

---

<div class="post-metadata">

**Author:** ![Palugula\_Sunil](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/palugula_sunil/32/15974_2.png) [@Palugula\_Sunil](https://community.sonarsource.com/u/Palugula_Sunil)\
**Post date:** [May 7, 2021, 8:53am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/20 "2021-05-07T08:53:21Z")

</div>

Hi @Joe

Before upgrade i have once again verified all the prerequisites from the below link, See below screenshot.

[https://docs.sonarqube.org/latest/requirements/requirements/](https://docs.sonarqube.org/latest/requirements/requirements/)

![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/6/c/6c9015a3395232e8ecb52c67407c212aa8db609b.png)

Thanks,  
Sunil Palugula

---

<div class="post-metadata">

**Author:** ![Joe](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/joe/32/14820_2.png) [@Joe](https://community.sonarsource.com/u/Joe)\
**Post date:** [May 7, 2021, 4:02pm UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/21 "2021-05-07T16:02:33Z")

</div>

Hi @Palugula_Sunil ,

You will have to work with your network/Linux admin to tune your settings. I think you may have to increase those settings more than what may be suggested or what you have currently. See also similar issue [here](https://community.sonarsource.com/t/sonarqube-upgrade-6-7-7-6-too-many-open-files/10075/12).

---

<div class="post-metadata">

**Author:** ![Palugula\_Sunil](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/palugula_sunil/32/15974_2.png) [@Palugula\_Sunil](https://community.sonarsource.com/u/Palugula_Sunil)\
**Post date:** [May 11, 2021, 5:54am UTC](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907/22 "2021-05-11T05:54:49Z")

</div>

Hi Joe,

I have reach our Linux team and have set the values to below but still seeing same issue. please let me know the next steps for me to proceed further?

sysctl -w vm.max\_map\_count=786432  
sysctl -w fs.file-max=262144  
ulimit -n 262144  
ulimit -u 12288

Thanks,  
Sunil Palugula

[Next page](https://community.sonarsource.com/t/my-project-scanning-time-got-increased-suddenly-with-huge-time-difference/33907.md?page=2)
