Sonar-scanner is too slow when scaning php project

project detail using cloc:

Preformatted textgithub.com/AlDanial/cloc v 2.02  T=29.00 s (735.5 files/s, 208511.4 lines/s)
------------------------------------------------------------------------------------
Language                          files          blank        comment           code
------------------------------------------------------------------------------------
PHP                               15221         153553         143614        4959497
JavaScript                         4021          75057          95428         368760
Markdown                            677          26762           2757          66403
HTML                                319           1399           2509          39556
JSON                                459            152              0          36406
CSS                                  61           3595            704          24124
...
------------------------------------------------------------------------------------
SUM:                              21328         265513         252383        5528522
------------------------------------------------------------------------------------

sonar-scanner command is under below

sonar-scanner 
-Dsonar.host.url=***
-Dsonar.login=***
-Dsonar.projectName=*** 
-Dsonar.projectKey=***
-Dsonar.qualitygate.wait=true 
-Dsonar.qualitygate.timeout=1200 
-Dsonar.scm.revision=a7b6d8db13529d87c20c728e56e6846ff1f11e40 
-Dsonar.projectVersion=a7b6d8db13529d87c20c728e56e6846ff1f11e40 
-Dsonar.branch.name=master 
-Dsonar.gitlab.api_version=v4 
-Dsonar.gitlab.project_id=***
-Dsonar.gitlab.commit_sha=***
-Dsonar.gitlab.ref_name=master 
-Dsonar.gitlab.user_token=***
-Dsonar.gitlab.url=*** 
-Dsonar.gitlab.ping_user=true 
-Dsonar.gitlab.json_mode=codeclimate.json
-Dsonar.gitlab.merge_request_discussion=true 
-Dsonar.gitlab.disable_global_comment=true 
-Dsonar.gitlab.query_wait=10000 
-Dsonar.gitlab.query_max_retry=100 
-Dsonar.exclusions='**/*.md,**/proto/**,**/pb/**,**/*_test.go,**/*.pb.go,**/*Test.java,**/Test*.java,**/*.html,**/node_modules/**,**/*.py,**/*.js,**/*.java' 
-Dsonar.sources='.' 
-Dsonar.inclusions='**/*.php' 

It takes up more than 2 hours to finish the process, is there any method to speed up sonar-scanner command?
sonar-scanner version: SonarScanner CLI 6.2.1.4610
sonarqube version: Community Edition 8.9.10

Hi,

Welcome to the community!

Your version is past EOL. You should upgrade to either the latest version or the current LTA (long-term active version) at your earliest convenience. Your upgrade path is:

8.9.10 → 9.9.8 → 10.8 (last step optional)

You may find these resources helpful:

If you have questions about upgrading, feel free to open a new thread for that here.

If your error persists after upgrade, please come back to us.

 
Ann