Autosave --> cannot change autosave duration

Hi,

The autosave duration parameter in coolwsd.xml has no effect…
Even if I change the value, the autosave remains at 30 sec.

Here are my parameters :
<autosave_duration_secs default=“300” desc=“The number of seconds after which document, if modified, should be saved. Defaults to 5 minutes.” type=“int”>5</autosave_duration_secs>
<idlesave_duration_secs default=“30” desc=“The number of idle seconds after which document, if modified, should be saved. Defaults to 30 seconds.” type=“int”>3</idlesave_duration_secs>

Thanks in advance.

Those numbers are extremely small (5 and 3 seconds respectively), is that really what you intended?

Hi,

Just a example to show it does not work !

Regards.

Hi @jmlm
Maybe it seems to not be working because the idle value overturns the other one. To understand better and even test it maybe better to do it individually, by setting one to -1 (so it gets disabled).

Try to disable idlesave_duration_secs and set autosave_duration_secs to your preferred value then, try the opposite and please report back : )

More often than not the test/debug is difficult to evaluate when both are enabled (because maybe you change the browser tab or press somewhere outside of the document etc)

Hi,

I’ve tried to set one by one idlesave_duration_secs and autosave_duration_secs to -1 and 15 (one is -1 and the other is 15 - and vice versa) → No change : Always 30 secs for the autosave…
My WOPI server don’t receive any post from the code server as you can see :
02/22/2022 17:00:59 - DEBUG - wopiputfile 18880663
02/22/2022 17:00:59 - DEBUG - PutFile
02/22/2022 17:00:59 - INFO - 192.168.5.222 - - [22/Feb/2022 17:00:59] “POST /wopi/files/18880663/contents?access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyaWQiOiJqbWxtIiwiZmlsZW5hbWUiOiJ0b3RvLm9kdCIsImZ1bGxfZmlsZW5hbWUiOiIvaG9tZS9qbWxtL3dvcGkvZGF0YS90b3RvLm9kdCIsInZpZXdtb2RlIjoiUkVBRF9XUklURSIsInRva2VuX2V4cGlyYXRpb24iOjE2NDU2MzIwMTUsImlub2RlIjoiMTg4ODA2NjMiLCJzaXplIjoiODUwNyIsInJhbmRvbSI6NDc0LCJVc2VyRnJpZW5kbHlOYW1lIjoiam1sbSJ9.APSV9B3lUVKczTolZPGqsaC6jhihXOzXqVmCeOqXyyI&access_token_ttl=0 HTTP/1.1” 200 -
02/22/2022 17:01:30 - DEBUG - wopiputfile 18880663
02/22/2022 17:01:30 - DEBUG - PutFile
02/22/2022 17:01:30 - INFO - 192.168.5.222 - - [22/Feb/2022 17:01:30] “POST /wopi/files/18880663/contents?access_token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyaWQiOiJqbWxtIiwiZmlsZW5hbWUiOiJ0b3RvLm9kdCIsImZ1bGxfZmlsZW5hbWUiOiIvaG9tZS9qbWxtL3dvcGkvZGF0YS90b3RvLm9kdCIsInZpZXdtb2RlIjoiUkVBRF9XUklURSIsInRva2VuX2V4cGlyYXRpb24iOjE2NDU2MzIwMTUsImlub2RlIjoiMTg4ODA2NjMiLCJzaXplIjoiODUwNyIsInJhbmRvbSI6NDc0LCJVc2VyRnJpZW5kbHlOYW1lIjoiam1sbSJ9.APSV9B3lUVKczTolZPGqsaC6jhihXOzXqVmCeOqXyyI&access_token_ttl=0 HTTP/1.1” 200 -

regards

-1 isn’t a valid setting, it should be 0 if you want to disable that kind of autosave. And I’d try with a larger number than 15 (or 30 for that matter).

Hi,

I’ve misunderstood the autosave parameters :blush: But there is something I don’t understand any more :
If if save a document, just modify it quickly, end then wait for the auto-save, the parameter “idlesave_duration” should be activated for the time between the 2 autosaves.
My parameter is now 60 (the auto-save_duration_secs is 120)
I’ve just modified the document, saved it manually, then quickly modified a character and then just waited → my wopiserver log shows me almost 1mn and half between the 2 autosaves…

The difference is not so important but I don’t understand how and why.

Here is the wopi debug log.
Regards.

03/08/2022 15:37:36 - INFO - wopiputfile 1575516
03/08/2022 15:37:36 - DEBUG - PutFile
03/08/2022 15:37:36 - DEBUG - User-Agent: COOLWSD HTTP Agent 21.11.2.4
Authorization: Bearer My Token Here
X-Wopi-Timestamp: 637823470564218940
X-Wopi-Proof: BlahBlah…BlahBlah
X-Wopi-Proofold: BlahBlah…BlahBlah
X-Cool-Wopi-Serverid: 7f580e7f
X-Wopi-Lock: cool-lock21f44ff6
X-Wopi-Override: PUT
X-Cool-Wopi-Ismodifiedbyuser: true
X-Lool-Wopi-Ismodifiedbyuser: true
X-Cool-Wopi-Isautosave: false
X-Lool-Wopi-Isautosave: false
X-Cool-Wopi-Isexitsave: false
X-Lool-Wopi-Isexitsave: false
X-Cool-Wopi-Timestamp:
X-Lool-Wopi-Timestamp:
Content-Type: application/octet-stream
Content-Length: 7961
Host: localhost:8880

Date: Tue, 08 Mar 2022 14:37:36
03/08/2022 15:37:36 - INFO - Write - /home/jmlm/wopi/data/test.odt
03/08/2022 15:38:59 - INFO - wopiputfile 1575516
03/08/2022 15:38:59 - DEBUG - PutFile
03/08/2022 15:38:59 - DEBUG - User-Agent: COOLWSD HTTP Agent 21.11.2.4
Authorization: Bearer My token here
X-Wopi-Timestamp: 637823471398816636
X-Wopi-Proof: BlahBlah…BlahBlah
X-Wopi-Proofold: BlahBlahBlah … BlahBlahBlah
X-Cool-Wopi-Serverid: 7f580e7f
X-Wopi-Lock: cool-lock21f44ff6
X-Wopi-Override: PUT
X-Cool-Wopi-Ismodifiedbyuser: true
X-Lool-Wopi-Ismodifiedbyuser: true
X-Cool-Wopi-Isautosave: true
X-Lool-Wopi-Isautosave: true
X-Cool-Wopi-Isexitsave: false
X-Lool-Wopi-Isexitsave: false
X-Cool-Wopi-Timestamp:
X-Lool-Wopi-Timestamp:
Content-Type: application/octet-stream
Content-Length: 7971
Host: localhost:8880
Date: Tue, 08 Mar 2022 14:38:59
03/08/2022 15:38:59 - INFO - Write - /home/jmlm/wopi/data/test.odt