Cache keeps growing. Cache expiration in onlyoffice docker with admin panel

Document Server:
Type: Enterprise Edition
Version: 9.1.0.168

Dear helpful people of this community,

As with some other threads on this site, our cache does not clean up properly.
We have files from years ago, but also right now not all files in the cache vanish in 24h as they should. We are slowly running out of space.

It is a docker install without much costumization. Onlyoffice is used with Nextcloud.
It runs on an up to date debian bookworm. Onlyoffice works fine, according to user feedback, but the cache keeps growing bigger.

Here the docker-compose.yml

version: ‘2’
services:
onlyoffice:
container_name: onlyoffice-documentserver-ee
image: onlyoffice/documentserver-ee
environment:
- NGINX_WORKER_PROCESSES=16
- NGINX_WORKER_CONNECTIONS=1024
- JWT_ENABLED=true
- JWT_SECRET=somesecretiwonttell
- JWT_HEADER=Authorization
- JWT_IN_BODY=true
ports:
- ‘5007:80’
stdin_open: true
restart: always
volumes:
- /data/onlyoffice/app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice
- /data/onlyoffice/app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data
- /data/onlyoffice/app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice
- /data/onlyoffice/app/onlyoffice/DocumentServer/db:/var/lib/postgresql
- /home/onlyoffice/bin/entrypoint.sh:/custom/entrypoint.sh
entrypoint: /custom/entrypoint.sh
networks:
- onlyoffice
networks:
onlyoffice:
external: true

I read through:

and

Especially

…but I think all these approaches to configuring cache expiration in docker are superseded by the admin panel. I could not get local-production-linux.json to work for me, but the admin panel works.

I have set the log level to debug through the admin-panel and am now seeing, that my changes through the admin panel are respected by the docker. I have changed the
Cache Cleanup Cron Expression to 00 */10 * * * * and the Files Removed At Once to 899 just to see if in our rather large installation the default 100 Files Removed At Once were the reason not 1all the files were deleted.

In the Log files I see that files are being removed.

zfgrep “end: removedCount” out.lo*|less

shows me many lines like:

out.log:[2025-11-19T09:44:17.223] [INFO] [localhost] [docId] [userId] nodeJS - checkFileExpire end: removedCount = 39
out.log:[2025-11-19T09:54:17.321] [INFO] [localhost] [docId] [userId] nodeJS - checkFileExpire end: removedCount = 35

When we shut down the server we always religiously use the

docker exec onlyoffice-documentserver-ee documentserver-prepare4shutdown.sh

My questions:

  • What further information do you need to possibly help me get to the bottom of this?
  • What should I do with the year old files in the cache that are probably no longer in the database?

kind regards,
Andreas

Hello @knurd75
Sorry for the late reply.
Please let us know your Nextcloud and the connector app just in case.
Now about the situation. Please go inside the container (docker exec -it ID_of_container bash) and check size of folders here: cd /var/lib/onlyoffice/documentserver/App_Data/cache/files > ls -lah

Also go to the Admin panel and show us your settings for Expiration tab (both Garbage Collection and Session Management). Additionally, are the any files in Forgotten Files tab?
Also, if you can share entire Document server logs folder, it would be helpful as well.

One more thing. I’ve noticed you’re using onlyoffice/documentserver-ee. If you have commercial license, you can contact colleagues of mine at https://helpdesk.onlyoffice.com/hc/en-us to get prompt replies.