SonarQube Engineer Interview Questions: Experienced (2027)
34 SonarQube questions for experienced engineers: server processes, Linux limits, quality gate and new code design, CI wiring, upgrades, troubleshooting.
Experienced SonarQube interviews test whether you can run the platform, not just click through it. Expect questions on server processes, database and memory sizing, quality gate and new code design, CI wiring, permissions, upgrades and fixing a stuck instance. This page gives 34 questions with direct answers, checked against the SonarQube Server 2026.5 documentation.
If you are still learning what the tool does, start with the fresher SonarQube questions. This page assumes you can already run a scan and want to answer design and troubleshooting questions for a role with three or more years of experience.
Key takeaways
- SonarQube Server runs three Java processes: Web, Compute Engine and Elasticsearch, started and watched by a fourth process called Sonar. The database stores metrics, issues, configuration and the report queue.
- Production needs an external database. The embedded H2 database is for trials and tests. PostgreSQL versions 15 to 18 are supported in the 2026.5 documentation.
- The built-in Sonar way quality gate checks new code only, which lets a team with old technical debt still enforce a clean standard going forward.
- On Linux the host needs
vm.max_map_countof at least 524288 and file descriptor limits of at least 131072 for Elasticsearch to start. - Most CI problems come from three causes: a shallow Git clone, a missing coverage report path, or a pipeline that does not wait for the quality gate.
- Updates go from one LTA to the next, with a database backup first. Read the release notes for every version in between.
How the questions are grouped
| Section | Questions | What it tests |
|---|---|---|
| Architecture and hosting | 1 to 9 | Processes, database, memory, Linux limits, editions |
| Quality standards design | 10 to 18 | Quality gates, new code, profiles, governance |
| CI and pull requests | 19 to 26 | Scanner setup, waiting for the gate, webhooks, coverage |
| Operations and upgrades | 27 to 31 | Backup, update path, monitoring |
| Troubleshooting | 32 to 34 | Failing startup, stuck analysis, gate surprises |
Architecture and hosting
1. Describe the processes inside SonarQube Server.
Three Java processes do the work. The Web process serves the user interface and the Web API. The Compute Engine takes analysis reports from a queue and writes the results to the database. Elasticsearch keeps an indexed copy of the data for fast search. A fourth process named Sonar starts, monitors and stops the other three.
2. What does the database store, and what does Elasticsearch store?
The database holds metrics and issues from scans, the instance configuration and the report job queue. Elasticsearch holds an indexed copy of the database data. If the Elasticsearch data is lost, the Web process is responsible for rebuilding the indexes.
3. Which databases can you use in production?
PostgreSQL (versions 15 to 18 in the 2026.5 documentation), Microsoft SQL Server and Oracle. The embedded H2 database starts by default, but the documentation recommends it only for tests and trials. It cannot handle high transaction volumes, has no replication, and file-based mode lacks the durability you want for production data. Host the database on a machine separate from the server with low latency between them.
4. What Linux settings does Elasticsearch need?
The documentation lists four requirements: vm.max_map_count of at least 524288, fs.file-max of at least 131072, the ability for the SonarQube user to open at least 131072 file descriptors, and at least 8192 threads.
sysctl -w vm.max_map_count=524288
sysctl -w fs.file-max=131072
ulimit -n 131072
ulimit -u 8192
To make the values permanent, put the sysctl lines in a file such as /etc/sysctl.d/99-sonarqube.conf, and set nofile and nproc limits for the sonarqube user (or LimitNOFILE and LimitNPROC in the systemd unit). If the kernel does not allow these values, the documentation says running SonarQube is not supported.
5. How is memory split between the processes?
Each process has its own maximum heap, set by a property: sonar.web.javaOpts, sonar.ce.javaOpts and sonar.search.javaOpts. In the 2026.5 documentation the Developer edition defaults are -Xmx1G for Web, -Xmx1536m for the Compute Engine and -Xmx512m for Elasticsearch. Enterprise and Data Center default to 2G, 4G and 2G. These are ceilings, not reserved memory.
The documentation also warns that setting one of these properties replaces the whole default value, including other JVM flags. To add a flag without losing the defaults, use the matching javaAdditionalOpts property.
6. A team says analyses are slow. Where do you look first?
Start with the Compute Engine, because it processes every report. Check whether tasks are queuing in the background tasks list, whether the Compute Engine heap is near its limit, and whether the database is slow. Slow scanner steps on the CI side (cloning, building, running tests) are a separate cause, so compare the scanner log time with the time the report spent waiting in the queue.
7. How do the editions differ?
The 2026.5 documentation lists Developer, Enterprise and Data Center editions, all licensed per instance by lines of code. Developer adds branch and pull request analysis, more languages and stronger security checks on top of the free SonarQube Community Build. Enterprise adds governance, portfolios and compliance reporting. Data Center adds high availability, redundancy and autoscaling on Kubernetes. Verify feature availability against the feature matrix on the editions page before promising it to a client.
8. Which install method would you choose?
The documentation recommends Docker or Helm. ZIP installation still works but is marked for removal in a future release. On Kubernetes use the official Helm chart, an external database and persistent volumes for data, and plan the Linux kernel settings on the nodes, because the pods inherit them.
9. When do you need Data Center Edition?
When the instance must stay available through the loss of a node, or load has outgrown a single machine. The documentation describes a clustered topology with search and application nodes. A single-node Enterprise installation is described as suitable for large instances up to 50 million lines of code, so measure before you buy a cluster.
Quality standards design
10. What are the conditions of the Sonar way quality gate?
The documentation lists four conditions, all on new code: no new issues are introduced, all new Security Hotspots are reviewed, test coverage on new code is at least 80.0 percent, and duplication on new code is at most 3.0 percent. The gate is read-only. To change a threshold, copy it into a custom gate.
11. Why does the gate focus on new code?
A team cannot fix years of old issues overnight, but it can stop adding new ones. Judging only the code that changed gives developers a pass or fail they can act on within the pull request, and the old code improves as people touch it. This is often called the clean as you code approach.
12. What are the new code definition options?
Previous version, Number of days, Specific analysis and Reference branch. The global default is Previous version, which depends on sonar.projectVersion changing between releases. Number of days defaults to 30 and has a maximum of 90. Reference branch compares your branch with another one using SCM data, which suits trunk-based teams.
13. A project never changes its version string. What happens to its new code?
With Previous version, the new code period starts at the first analysis of the current version. If the version never changes, "new code" keeps growing until it equals the whole project, and the gate stops being useful. Either set sonar.projectVersion on release or switch the project to Number of days or Reference branch. The documentation advises against using the build number as the version, because it overloads the database.
14. How do pull request quality gates differ from branch gates?
For branches both overall code and new code conditions apply. For pull requests only conditions on new code apply, and new code means whatever changed against the target branch.
15. What is the quality gate fudge factor?
A default mechanism that ignores duplication conditions until there are at least 20 new lines and coverage conditions until there are at least 20 new lines to cover. It stops a tiny change from failing the gate on a percentage that means nothing. Project administrators can override the setting for their project.
16. How are quality profiles organised?
Each language has a profile that selects the rules. The 2026.5 documentation lists three built-in profiles per language: Sonar way core (the default), Sonar way extended and Sonar way comprehensive, with growing strictness. For governance, create a custom profile for the organisation and keep it under change control, instead of letting each project switch rules on and off.
17. Who can change gates and profiles?
Creating and editing custom quality gates needs the Administer Quality Gates permission. Project managers can associate their project with a gate. Quality profile management has its own permission that an administrator can grant to named users or groups. Give these rights to a small platform group.
18. Security Hotspots are being phased out. How do you explain that?
The 2026.5 documentation says rules that used to raise hotspots now raise vulnerabilities (in the Standard Experience) or security issues (in MQR mode), and existing hotspot findings must be converted. Say that you track this in the release notes and plan the migration, because the review-based condition in the default gate is tied to hotspots.
CI and pull requests
19. Write the minimum scanner configuration for a project.
# sonar-project.properties
sonar.projectKey=payments-api
sonar.sources=src
sonar.tests=test
sonar-scanner -Dsonar.host.url=https://sonar.example.com -Dsonar.token=$SONAR_TOKEN
sonar.projectKey is mandatory. The scanner also reads the SONAR_TOKEN and SONAR_HOST_URL environment variables, which keeps the token out of the command line and out of the process list.
20. Which scanner do you use for which build tool?
Maven and Gradle projects use the SonarScanner for Maven or for Gradle. .NET uses the SonarScanner for .NET. Python, JavaScript, TypeScript and other projects with no build-specific scanner use the SonarScanner CLI, and its Java requirement changes between scanner versions, so read the requirements on the scanner page before you pin a version in CI.
21. Why does the GitHub Actions example use fetch-depth 0?
SonarQube uses SCM data for blame information and for new code detection. A shallow clone does not contain the history, so issues can be attributed wrongly and new code can be calculated wrongly. The documentation's workflow disables shallow clones for that reason.
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: SonarQube scan
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
run: ./gradlew build sonar --info
22. How do you fail the pipeline when the gate fails?
Scanner properties: set sonar.qualitygate.wait=true. The scanner then polls the server and fails the step if the gate fails. The wait is limited by sonar.qualitygate.timeout, which defaults to 300 seconds. In Jenkins you instead use the withSonarQubeEnv step, set up a webhook back to Jenkins, and add a waitForQualityGate stage, usually inside a timeout block.
23. What are webhooks used for?
SonarQube sends an HTTP POST with a JSON payload when a background task finishes, with the project key in the X-SonarQube-Project header. Jenkins uses this to resume a paused pipeline. The server can sign the request with an HMAC-SHA256 using a secret you configure, so the receiver can verify it. Always set the secret.
24. Coverage shows 0 percent although tests run. Why?
SonarQube does not run tests. It imports a coverage report that the build produced, and it needs the report path set. The property depends on the language, for example sonar.coverage.jacoco.xmlReportPaths for Java with JaCoCo, sonar.javascript.lcov.reportPaths for JavaScript and sonar.python.coverage.reportPaths for Python. Check that the report is generated before the scan step, that the path is correct from the scanner working directory, and that source paths in the report match the project layout.
25. How do you keep generated code out of the analysis?
Use exclusions, such as sonar.exclusions=**/generated/** in the project properties, or set exclusions in the project settings. Excluding generated files keeps the metrics honest, but exclude narrowly. A broad pattern that hides real source quietly weakens the gate.
26. How do you handle a monorepo?
Treat each deployable as its own project with its own key, scan it with its own properties, and bind each to the right quality gate. The documentation has a monorepo section for DevOps platform integrations. Avoid one giant project, because a failing module then blocks unrelated teams.
Operations and upgrades
27. Walk through an update of SonarQube Server.
Read the release notes for each version between yours and the target, then take a database backup. The pre-update guidance suggests keeping database disk usage under 50 percent because tables can be duplicated during migration. Test the update on a copy first, update, then run the post-update steps and verify analyses and plugins.
28. What is an LTA and why do you care?
LTA stands for long-term active. The 2026.5 release is an LTA and the previous one is 2026.1. The documentation says you can update directly from 2026.1 LTA to 2026.5 LTA, and earlier LTA versions need an update path from the path calculator. Teams that want stability stay on LTA releases and move once or twice a year.
29. How do you back up a SonarQube instance?
The database is the source of truth, so back it up with the tools of your database engine. Also keep the configuration files and any extensions you installed. Elasticsearch data can be rebuilt, so it is not the core of the backup.
30. What do you monitor?
Disk space (Elasticsearch locks indices into read-only mode when the disk is nearly full, as the host requirements page explains), heap use per process, the Compute Engine queue length, and database health. On Kubernetes the documentation describes exposing Prometheus metrics.
31. How do you secure the instance?
Put it behind a reverse proxy with TLS, restrict network access, use SSO through your identity provider where the edition supports it, and give scanners analysis tokens with the least permission needed. Rotate tokens when staff leave.
Troubleshooting
32. The server will not start and the log mentions Elasticsearch. What do you check?
Start with the Linux limits from question 4, because failed bootstrap checks are the most common cause. Then check free disk space, permissions on the data and temp directories (Elasticsearch needs read and write access to the temp directory on recent releases) and heap settings that exceed available memory.
33. An analysis finished but the project page still shows old results. Why?
The scanner uploads a report and finishes. The Compute Engine then has to process it. If the task is queued or failed, the page does not change. Open the background tasks page, find the task for the project and read its error. Typical causes are a full database, a Compute Engine out of memory, or a project key mismatch.
34. The gate passed yesterday and fails today with no code change. Why?
Several things can change a gate without a commit. A rule set update through a new analyzer version adds issues. The new code period moved forward, so earlier issues dropped out or new ones counted. Someone edited a custom gate or profile. Open the quality gate history for the project to see which condition changed, then compare the profile change log.
How to prepare
- Install SonarQube Server with Docker Compose, PostgreSQL and the Linux settings from question 4. Break the settings on purpose and read the startup error.
- Scan one Java or Python project from a CI pipeline with a coverage report, then make the gate fail and pass.
- Create a custom quality gate and a custom quality profile, and assign them to two projects.
- Read the release notes of the last two releases, so you can speak about changes without guessing.
Related pages: the 90+ SonarQube interview questions main guide, scenario-based SonarQube questions, real-time SonarQube questions for live incidents, and the SonarQube study plan. For Jenkins wiring see why integrate SonarQube into Jenkins.
Training
Quality gates belong in a secure pipeline. Our DevSecOps training and Jenkins training practise this setup hands-on. Classes run in Kharadi, Pune, and live online across India.
FAQ
What does a SonarQube engineer do?
A SonarQube engineer installs and maintains the server, designs quality gates and profiles, connects scanners to CI pipelines, manages permissions and tokens, handles updates, and helps teams fix failing gates.
What database does SonarQube support in production?
PostgreSQL, Microsoft SQL Server and Oracle. The documentation does not recommend the embedded H2 database for production.
What are the Linux requirements for SonarQube?
vm.max_map_count of at least 524288, fs.file-max of at least 131072, at least 131072 open file descriptors and 8192 threads for the user that runs the server.
What does the Sonar way quality gate check?
Four conditions on new code: no new issues, new Security Hotspots reviewed, coverage of at least 80.0 percent and duplication of at most 3.0 percent.
How do I fail a CI pipeline when the quality gate fails?
Set sonar.qualitygate.wait=true in the scanner, or use a webhook with waitForQualityGate in Jenkins. The default timeout for the wait is 300 seconds.
Why should the Git clone not be shallow?
SonarQube needs SCM history for blame data and new code detection. A shallow clone gives it incomplete history and can produce wrong attribution.
How do I upgrade SonarQube safely?
Read the release notes, back up the database, test on a copy, update along the LTA path, then run the post-update steps.
Official references
- SonarQube Server documentation: Server components
- SonarQube Server documentation: Server host requirements
- SonarQube Server documentation: Pre-installation on Linux
- SonarQube Server documentation: Understanding quality gates
- SonarQube Server documentation: Quality standards and new code
- SonarQube Server documentation: Pre-update steps
- SonarQube Server documentation: SonarScanner CLI
What's Your Reaction?
Like
0
Dislike
0
Love
0
Funny
0
Angry
0
Sad
0
Wow
0