SonarQube embedded Database struggling to handle the large application

Hi Team,

We are using SonarQube 10.6 Community edition version and does not have any external database attached to it. We are using only H2 Embedded DB offered by Sonar and suddenly from yesterday our SonarQube application struggles to load and ending with 502 error. We want to know what is the default size of embedded db and how far it can handle the larger applications.
Is there any options to increase/extend it?
Any other ways there to cleanup the data’s in embedded DB to make SonarQube operational and up?
Please assist here. Expecting your quick response over this matter!

Thanks,
Muhammadh.

Hi Team,

Attaching most recent logs from our application below related to H2 DB. Please help.

2025.01.06 07:59:17 ERROR web[o.s.s.p.w.RootFilter] Processing of request /api/developers/search_events?projects=5364_OSPDashboard_6.0.0&from=2025-01-06T17%3A11%3A47%2B0530 failed
org.apache.ibatis.exceptions.PersistenceException:

Error querying database. Cause: org.h2.jdbc.JdbcSQLNonTransientException: General error: “General error: ““org.h2.mvstore.MVStoreException: java.lang.OutOfMemoryError: Capacity: 35831808 [2.2.224/3]”” [50000-224]” [50000-224]

at org.h2.message.DbException.getJdbcSQLException(DbException.java:566)
at org.h2.message.DbException.getJdbcSQLException(DbException.java:489)
at org.h2.message.DbException.get(DbException.java:212)
at org.h2.engine.Database.throwLastBackgroundException(Database.java:1817)
at org.h2.engine.SessionLocal.beforeCommitOrRollback(SessionLocal.java:764)
at org.h2.engine.SessionLocal.commit(SessionLocal.java:679)
at org.h2.command.Command.commitIfNonTransactional(Command.java:315)
at org.h2.command.Command.executeUpdate(Command.java:247)
at org.h2.server.TcpServerThread.process(TcpServerThread.java:413)
at org.h2.server.TcpServerThread.run(TcpServerThread.java:191)
at java.base/java.lang.Thread.run(Thread.java:842)

Caused by: org.h2.message.DbException: General error: “org.h2.mvstore.MVStoreException: java.lang.OutOfMemoryError: Capacity: 35831808 [2.2.224/3]” [50000-224]
at org.h2.message.DbException.get(DbException.java:212)
at org.h2.message.DbException.convert(DbException.java:407)
at org.h2.mvstore.db.Store.lambda$new$0(Store.java:122)
at org.h2.mvstore.MVStore.handleException(MVStore.java:1546)
at org.h2.mvstore.MVStore.panic(MVStore.java:371)
at org.h2.mvstore.FileStore.serializeAndStore(FileStore.java:1441)
at org.h2.mvstore.FileStore.lambda$storeIt$2(FileStore.java:1376)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
… 1 more

Thanks,
Muhammadh

Hi Team,

Suddenly today onwards our sonarqube url was down and we did restart the sonar services as well. it was not working.

We are using sonarqube 10.6 version and having java jdk 17.0.12. even we tried to install jdk 17.0.13 as well but not working. We have IIS reverse proxy setup for the URL and hosted this sonarqube on windows VM

Kindly help us. Service is running inside the VM but the localhost url as well as DNS url is not loading.

Adding log files as well from server.es.log (57.4 KB)
es.log (57.4 KB)

SonarServiceWrapper.wrapper.log (98.8 KB)
sonar.log (17.5 KB)

Thanks,
Muhammadh.

Hi Team,

Any updates here please? our application is not starting up and giving this error when we tried to make it running inside our windows VM.

Expecting your quick response here.

Thanks,
Muhammadh.

Hi Team,

Sonarqube 10.6 version was loading very slowly first and was giving authentication error even after the correct entry of username and password. Later it stopped loading and started giving 500 internal error. We restarted the services and app pool to make it work but that also did not work as now we are getting 502 error.
Jdk 17.0.13 is the java version which we are currently using and earlier we were using jdk 17.0.12 but anyhow both were stable.
Localhost 9443 itself is not loading for us. We have reverse proxy settings for our sonar url and we have attached the logs.
We are at a very crucial stage right now as sonarqube is like production for us.

sonar.log (17.5 KB)
SonarServiceWrapper.wrapper.log (98.8 KB)
es.log (57.4 KB)

Hey there.

I’ve combined your 3 separate threads related to the same issue. In the future, it is much preferred that you have 1 thread.

There is a big sign on every page of a SonarQube instance using the embedded H2 database that it should only be used for testing, and not for production purposes.

As stated there, It’s also not possible to move data out of the H2 database into a scalable environment (a real database, like Postgres).

Your best option to move forward is to actually install a production instance. Anything else is just a band-aid.

Hi Colin,

We are not looking for moving out the data from embedded H2 DB. We wanted to know if any upgrade option available to expand H2 DB but from your recent post we assume that it is not possible.

Alternatively any other options is there to make the SonarQube Operational now? Do we need to use any external MSSQL DB to our SonarQube application?

Also you are saying to install a production instance. Means you asking us to go for Developer/Enterprise edition? We are currently having community edition.

Thanks,
Muhammadh.

Hi Team,

Any updates please? We have tried to increase JVM and elastic search memory as well like below and still not helping.

We are using Java JDK version 17.0.13 and also confirm if this is compatible with sonarqube 10.6 community edition.

sonar.web.javaOpts=-Xmx8g -Xms4g -XX:+HeapDumpOnOutOfMemoryError
sonar.search.javaOpts=-Xmx2g -Xms2g

Thanks,
Muhammadh

Please refer to the FAQ and the spirit of this community forum.

I created a topic, when can I expect a response?

This is an open community with people volunteering their free time to provide assistance. We’re eager to contribute to the community, but you are not guaranteed a fast response.

Be patient

  • Wait a few days before bumping a topic that hasn’t received a response.
  • Do not @name mention individuals not involved in the topic.

Contribute as much as you expect to receive

  • Contribute to the community (helping others) as much as you expect to receive help.

It is not a replacement for more structured support

  • If you need SLAs, guaranteed response, privacy, SonarSource also offers Commercial Support.

I don’t have any guidance to share about how to get the H2 Database functional again. Again, it is only meant to be used for evaluation purposes.

Nope! You can install an external database to use alongside SonarQube Community Build. See the docs here.