CMK 2.1: service discovery fails for slow devices

To save others the research:

lib/check_mk/gui/http.py:

    @property
    def request_timeout(self) -> int:
        """The system web servers configured request timeout.

        This is the time before the request terminates from the view of the client."""
        # TODO: Found no way to get this information from WSGI environment. Hard code
        #       the timeout for the moment.
        return 110

In my case I’ve now changed it to 230 (in order to test whether this is indeed the right place)

NOTE: This needs to happen in concert with a corresponding change to the PHP-FPM site config:

etc/apache/conf.d/02_fcgid.conf

IPCCommTimeout 120
GracefulShutdownTimeout 120

… which I’ve changed to 240.

Don’t forget to “omd restart apache”, afterwards my switch discovery worked fine again.

I’ve got no idea why it was working fine for years despite the obvious intention (and FPM settings?) suggesting otherwise, but it most certainly did work, without any modification to the builtin Checkmk lib/ code