Currently the timeout for generating previews is set to 5 seconds. In some cases you may want to have longer timeouts. In addition we should add a configurable limit for the file size so that larger files (default of 100MB) are not even sent over to be converted and just will have no preview.
It should just be a command line config option that can be set with occ config:app:set like the others in the docs at https://github.com/nextcloud/richdocuments/blob/main/docs/app_settings.md
Config values should be handled in https://github.com/nextcloud/richdocuments/blob/main/lib/AppConfig.php