Report information timing out

Hello, we are finding reports are timing out once the number of results for a scan grows large. 8000 results seems to be too much. The various tabs of the report field stay at 0 and we get the following message:

Error while loading Report f6cba155-b3e4-4161-9070-5aa820779c58
Please try again.
Hide Error Details
Rejection: Unknown Error
Error
    at new $b (https://greenbone.ourdomain.com/static/js/main.cae1bbe1.js:2:1885360)
    at https://greenbone.ourdomain.com/static/js/main.cae1bbe1.js:2:1888286

It seems to be about a minute before the timeout. Looking at top we can see postgres working hard,

Apart from splitting the scans into multiple IP blocks, is there anything we can adjust to have the front end wait longer for the database? (I’m guessing that is the issue here)

The host machiine is a VM with the containers on a SAN. We have allocated plenty of RAM, CPU and although postgres uses 100% on some cores there are still free resources on the machine.

Greenbone about shows version 22.9.1

You can adjust the timeout … please check the other posts here. And you should work on your IO, a faster Storage (NVME native) would help if you need to speed up you database.

2 Likes

Thanks Lukas, can you post a link to the post about adjusting the timeouts? I have searched the forum already, and I’ve only found a few related posts that are inconclusive as to what to do.

You can try search for “adjust GSA timeout”.

Here are some relevant posts with answers:

2 Likes

Thanks for the pointers. It was the second post that had the answer from bricks. If anyone else finds this, create a file in the gsa container as follows:

Add a config.js file to /usr/local/share/gvm/gsad/web/ with the following content:

config = {
  timeout: <timeout in seconds>,
}
1 Like

Well, what worked for me is the following:

  • Go into the container: docker exec -it greenbone-community-edition-gvmd-1 /bin/bash

  • copy the original system service file: cp gvmd.service gvmd.service.original

  • echo the contents to the gvmd.service file:

echo

"[Unit]

Description=Greenbone Vulnerability Manager daemon (gvmd)

After=network.target networking.service postgresql.service ospd-openvas.service

Wants=postgresql.service ospd-openvas.service

Documentation=man:gvmd(8)

ConditionKernelCommandLine=!recovery

[Service]

Type=forking

User=gvm

PIDFile=/run/gvmd/gvmd.pid

RuntimeDirectory=gvmd

RuntimeDirectoryMode=2775

ExecStart=/usr/local/sbin/gvmd --osp-vt-update=/run/ospd/ospd-openvas.sock --listen-group=gvm --schedule-timeout=180

Restart=always

TimeoutStopSec=10

[Install]

WantedBy=multi-user.target" > gvmd.service

Timeout is in seconds, if you need more, edit 180 with your desired value.

  • Restart the gvmd container: docker restart greenbone-community-edition-gvmd-1
    Not only that I don’t have the timeout problem anymore but it seems somehow is much more faster than it was before. If before, for ~400 results I kept getting timeout after 60 seconds, now, the same results export after only ~14 seconds.
    –schedule-timeout - is explained in gvmd help as the timeout for scheduled tasks.
    I don’t have a reasonable explanation but I do hope this helps somebody.