Coauthor limits and scaling
Coauthor keeps a headless editor open for each session: CKEditor 5 running in a browser on the server, with no screen. So Coauthor needs more memory and CPU than the basic collaboration features.
| Setup | CPU | Memory per container |
|---|---|---|
| Collaboration Server On-Premises, Coauthor not used | as for the basic features | as for the basic features |
| With Coauthor | 2 | 4 GB |
| With Coauthor and large documents | 2 | more than 4 GB, or a lower page limit. See What the memory use depends on. |
The values in the table are for the default page limit. One container with 1 CPU is not enough: with 13 active sessions, the Coauthor tools responded several times slower.
If you run a separate Collaboration Worker (USE_BUILT_IN_COLLABORATION_WORKER=false), the Coauthor sessions run in the worker, not in the application server:
- A Collaboration Worker that serves Coauthor needs 2 CPU and 4 GB for its default of 20 Coauthor sessions. The 2 CPU and 2 GB in Features that require an editor bundle are for document conversions only.
- The application server keeps the resources for the basic features. In our tests, it used less than 1 GB with up to 35 active Coauthor sessions in the worker.
For the rest of the server, see Requirements.
The memory of one Coauthor session depends on the document and the editor:
- the size of the document content,
- the number of comments, suggestions and revisions,
- the editor features in your editor bundle, and your custom plugins.
We measured the default limits with documents of about 50 KB (HTML) with 5 comments, 5 suggestions and 5 revisions each. With documents of 100 KB of text, we measured 13 sessions per container.
In our tests, a session on a document of 1 MB used about 4 times more memory than a session on a document of 100 KB. If your documents are large, give the container more memory or lower the page limit.
Each container has two limits for sessions. A session is the work of your AI agent on one document.
The page limit. KEEP_ALIVE_EDITORS_MAX_OPEN_PAGES sets how many sessions one container keeps open. Each session keeps one headless editor page. The default is 15 in the Collaboration Server On-Premises application and 20 in a separate Collaboration Worker. For documents larger than about 50 KB, lower the limit.
The memory limit. Set a memory limit on each container that runs Coauthor sessions. With the built-in worker, that is the application container. With a separate worker, it is each worker container. When a container uses 80% of its memory limit or more, Collaboration Server On-Premises sends no new sessions to it. It counts the memory of the whole container, as docker stats does. This protects the container when documents are larger than expected.
Every container platform has a setting for this limit. For example:
- Docker:
docker run --memory 4g. - Docker Compose:
mem_limit: 4gon the service. - Kubernetes:
resources.limits.memoryon the container.
Your license has a limit too. Each agent counts as a user of your license. Use one user ID per agent.
The memory protection is off when the container has no memory limit of its own, even if a group of containers has one. For example, it is off when:
- Docker: you start the container without
--memory. - Kubernetes: the container has no
resources.limits.memory, even when the pod has a limit. - Amazon ECS: the limit is set only on the task, not on the container.
Then the container logs this warning once at start:
The container memory monitor is disabled.
Without a memory limit, KEEP_ALIVE_EDITORS_MAX_OPEN_PAGES is the only protection. Test Coauthor with your documents and your load, and set the page limit to fit the memory of your machine.
- Live documents: calls still work, but run slower. Each call opens a short page that closes when the call ends. A container runs up to 3 such pages at once, on top of the page limit.
- Uploaded documents: new sessions fail with HTTP 503
The editor is busy and could not run this call in time. Your agent should wait a moment, and try again.
If a container stops, for example when you remove it, Coauthor opens the editor again on another container and runs the call. Your agent sees no error. On an uploaded document, this fails with the same HTTP 503 while no container has a free page.
See Connect an agent for how your agent works on a document.
If the memory of your containers stays well below the memory limit under your normal load, you can raise KEEP_ALIVE_EDITORS_MAX_OPEN_PAGES. Raise it step by step, and keep the peak memory below 80% of the memory limit.
Watch two things on each container that runs sessions: its memory and its free session slots.
- Memory: measure it with your platform tools, for example
docker stats, cAdvisor, Kubernetes metrics or Amazon ECS Container Insights. See Monitoring resources. - Free session slots: read them from the metrics endpoint. It shows how many sessions are open, and which requests were slower or failed.
Add containers when the memory gets near the limit, or when more than about 70% of all session slots are in use. The Metrics page shows the queries to scale and alert on.
These log lines show that the containers are full. They use the warn level:
Keep-alive workers skipped while routing.: Coauthor sent no new session to a container, because it was full (reason: full) or near its memory limit (reason: memory, withmemoryPercent).The container memory monitor is disabled.: the container has no memory limit that it can read.
If a container runs out of memory, the operating system stops one headless browser process, not the container. The container keeps running, and the sessions in that browser fail with The keep-alive editor page crashed. Your platform can still record the out-of-memory event, even though the container keeps running. For example, docker inspect shows OOMKilled: true, which means the system stopped a process to free memory. To prevent it, see What the memory use depends on.
For where the logs go and how to collect them, see Logs and monitoring.