Recently updated NextCloud to v27.1.2 and ever since OnlyOffice Document Server will randomly disconnect. I can get it to connect again by going into the OnlyOffice app settings in Nextcloud and simply clicking Save. This lasts for about a day and then breaks again.
There was an issue with background check that caused disconnection. In version 8.2.2 this was fixed. Please update your connector app to the actual version and check the situation again. https://apps.nextcloud.com/apps/onlyoffice
If you are still experiencing issues with background check, you can disable it by adding this array to the config.php (located in ../config of your main app directory) of your Nextcloud: