Drive Realtime API model size limit exceeded despite empty root

空扰寡人 提交于 2019-12-24 01:39:39

问题


I have a drive file that seems to have a corrupted or leaky realtime document.

When I call realtimeDocument.getModel().getRoot().toString(), the output is {slides: []}, but when I try to insert a new slide (a custom object with 10 or 15 small string properties), I get a size limit error.

Model size limit has been exceeded. Used: 10681723 bytes; Limit: 10485760 bytes

Is there a way I can reinitialize the realtime document or otherwise get it to trim itself down?

This only seems to be happening in one file - all of my other files have reasonable mappings between realtime document size and model complexity.


回答1:


Have you previously created and removed a lot of objects from the document? Currently each CollaborativeObject persists in the model forever. Thus, removing it from the root doesn't actually free up the space. (This is because objects can become reattached to the root via collaborator actions or undo.)

In normal operations this shouldn't generally be a problem, but if you are constantly creating and removing objects you could run into issues.



来源:https://stackoverflow.com/questions/22362484/drive-realtime-api-model-size-limit-exceeded-despite-empty-root

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!