Issues and troubleshooting
High CPU usage on database
Occasionally when investigating resource-consuming SQL statements running on your system, you may find that some of them belong to the dbWatch application.
For example, a SQL statement that has the highest value of spent CPU time. In most cases, dbWatch executes the same SQL statements many times over a long time period so the accumulated CPU time becomes high, and at first glance this might be assumed to indicate a problem. However, if you calculate how much CPU time is consumed during a day, you will typically find that it is a matter of minutes.
Trouble with report generation on Linux
Some Linux installations without an X11 display may have trouble generating Global and Detail reports. The dbWatch Server and web interface may otherwise work normally, while report generation hangs or does not complete.
First, add the following to the dbwatch_server.parameters file located in the dbWatch Control Center installation directory (by default /opt/dbwatch-controlcenter):
-Djava.awt.headless=true
The file will then look like this (or similar):
JAVA_OPTS=-Xmx6g
-cp "{$bd$}/classpath/*"
-DbaseDir=/var/dbwatch-controlcenter
--enable-native-access=ALL-UNNAMED
-Djava.awt.headless=true
#-Djava.security.properties=file:"{$bd$}/allow-tls1.security"
no.dependent.DependentMain
-config "{$bd$}/dbwatch_server.conf"
-Dbd="{$bd$}"
Restart the dbWatch Server and test report generation again.
If reports still do not work, an X11 display may be required for server-side report rendering. On a headless Linux server, Xvfb (X Virtual Framebuffer) can be used to provide a virtual X11 display.
An example setup script for Ubuntu 24.04 and 26.04 is available here:
The script checks for Xvfb, offers to install it if required, configures a virtual display on :99, and configures the dbWatch Control Center service to use this display.
Review the script before running it and adjust it if required for your environment.
After configuration, verify that both Xvfb and dbWatch Control Center are running:
systemctl status dbwatch-xvfb dbwatch-controlcenter
systemctl show dbwatch-controlcenter -p Environment
The dbWatch service environment should include:
DISPLAY=:99
Restart the dbWatch Server if required, and retry the Global or Detail report.
If the Java headless option alone does not resolve the issue, configuring Xvfb may be required for server-side report rendering.