It`s just a hotfix for big devices like here:
Error when rescan devices - Troubleshooting - Checkmk Forum
or
Service Discovery fails with “failed to fetch state [500]: INTERNAL SERVER ERROR. Retrying in 1 second” - Troubleshooting - Checkmk Forum