Checkmk Inventory cannot deal with 5m Internet BGP routes

CMK version: 2.5.0p10
OS version: docker container on Fedora Core OS

“Found 5328506 inventory entries, software changes, hardware changes, networking changes, Found 42 status entries, execution time 21.7 sec”

Checkmk seems to be unable to cope with the about 5 million current ipv4 & ipv6 routes on the internet, it chokes the inventory plugin and is causing delays of about 20s when just opening the “services of host X” view in monitoring or the hw/sw inventory page with the tree collapsed.

Opening the inventory tree to the network routes results in:

{"result_code": 1, "result": "General error: Your request timed out after 110 seconds. This issue may be related to a local configuration problem or a request which works with a too large number of objects. But if you think this issue is a bug, please send a crash report.", "severity": "error"}

The inventory json of the affected hosts are around 128-130 MByte.

Opening other hosts views is quick (<0.3s), it just affects the systems with the huge amount of internet routes.

We removed the section where the routes are collected from mk_inventory on our routers.