New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
State is not persisted over docker restarts #284
Comments
Every time you shutdown ONLYOFFICE DocumentServer you should call This script will close all opened documents with message to users |
If you compiled DocumentServer not sure if that script is include, but it's looking like this:
|
Hum, I understand, this is already a workaround, I'd say. But so what you are saying is that if my server crashes, then I lose all documents. Do you have plan to fix this bug? Here you discuss about a force save for Nextcloud integration as well. Is it in your pipeline? Is there anything we can do to help move this fix faster? |
I agree with you on that
I think it's safe to save we want to fix it, but currently our app architecture do not allow this, so I cannot guarantee it |
Ok, I tested your curl, it does actually work, thanks for the tip already :) Nice to hear that you want to fix it :) Have a nice day then and thanks for your time! |
Great to hear, In that case I'll close this issue, but feel free to comment or open new issue if got any more questions |
As for the force save feature within the integration with Nextcloud. It is in our plans and we are working right now on the implementation of this feature. Unfortunately, I cannot specify any exact time frames at the moment. We know that this feature is a long-awaited one and we have just tested it in our DMS (Community Server), so we are doing our best to make it available within the integration in the nearest future. |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
Let's say I'm editing a document, then, the docker restarts.
When the docker is back online, my changes are lost.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
What is the expected behavior?
The changes should be persisted, even in the event of an unwanted restarts.
Did this work in previous versions of DocumentServer?
I don't think so.
DocumentServer Docker tag:
I used the docker-compose file from here, so I compiled it myself then.
I git clone with this commit.
Host Operating System:
Debian.
More info
I'm trying this with Nextcloud 18.0.6 and the onlyoffice application v4.3.0.
I tried to persist the state of the various components with this docker-compose (I redacted some parts):
But without success.
I did put ALL and DEBUG logs from documentserver, here is the relevant output:
I also tried to run:
right after the document save, to eventually identify where things could get stored, and no files appeared.
** Interpretation **
With all these information, my guess is that the state is not persisted on disk but the state is in memory. If we restart the process, then this would be the normal behavior to loose all the changes.
If you are alone using Nextcloud and onlyoffice, you have to remember to close the document, but now imagine you are 10 people. How do you make sure that everybody did close the document?
In a distributed environment, especially with docker, processes are more and more restarted, so this behavior makes the usage of onlyoffice complicated currently.
On top, it is regarded as a general good practice to not save state in memory, I recommend to read https://12factor.net/processes for instance.
Would the use of redis help mitigate this behavior?
I tried to run the Nextcloud cron, but this didn't help.
Let me know if I can provide further details.
Thanks for your help!
The text was updated successfully, but these errors were encountered: