After staying on the only office interface for too long, a prompt box pops up saying "Please refresh if you have stayed on this page for too long"

May I ask if this timeout period can be set?

Hello @sam123,
Yes, you can change this period using the sessionidle parameter.
Below is a link with instructions on how to edit this parameter: Configuring ONLYOFFICE Docs Developer Edition - ONLYOFFICE

If you have any further questions, feel free to reach out—we’re always happy to help.