Repository navigation
Saving/offloading is not happening #366
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Install Nextcloud 31 with Nextcloud Pi, and update to Nextcloud 32, the last version.
Install Document Server
Install Only Office plugin
Expected behaviour
When I close or keep the document open, I expect the document to be saved every 5min, as done by the internal cron job of debian.
Actual behaviour
Nothing happens. The App data stays as is, if I select the file from nextcloud, it is opening correctly, but the file is not saved to nextcloud. When I do a copy or download the file, it still keeps the original file. This is happening on a n external storage (smb), but also on internal storage.
The logs indicate a right issue, but the rights are correct. everything is owned and managed by www-data.
I tried a fully cleaned reinstall even deleting the related elements in the database, but the issue is still present, and started happening 2 weeks ago.
Server configuration
Web server: Apache
Database: Unknown. Default of Nextcloud Pi
PHP version: 8.3
Nextcloud version: 32.0.5
List of activated apps
root@nextcloudpi:/var/www/nextcloud# sudo -u www-data php occ app:list
Enabled:
- activity: 5.0.0-dev.0
- bruteforcesettings: 5.0.0-dev.0
- checksum: 2.0.3
- cloud_federation_api: 1.16.0
- comments: 1.22.0
- dav: 1.34.2
- documentserver_community: 0.2.1
- epubviewer: 1.8.1
- external: 7.0.0
- federatedfilesharing: 1.22.0
- federation: 1.22.0
- files: 2.4.0
- files_3dmodelviewer: 0.0.16
- files_archive: 1.2.8
- files_downloadactivity: 1.18.1
- files_downloadlimit: 5.0.0-dev.0
- files_external: 1.24.1
- files_pdfviewer: 5.0.0-dev.0
- files_sharing: 1.24.1
- files_trashbin: 1.22.0
- gpxpod: 7.2.4
- logreader: 5.0.0-dev.0
- lookup_server_connector: 1.20.0
- metadata: 0.23.0
- music: 2.5.1
- nextcloudpi: 0.0.2
- notifications: 5.0.0-dev.0
- notify_push: 1.3.0
- oauth2: 1.20.0
- onlyoffice: 9.12.0
- password_policy: 4.0.0-dev.0
- photos: 5.0.0-dev.1
- previewgenerator: 99.99.99
- privacy: 4.0.0-dev.0
- profile: 1.1.0
- provisioning_api: 1.22.0
- recommendations: 5.0.0-dev.0
- related_resources: 3.0.0-dev.0
- serverinfo: 4.0.0-dev.0
- settings: 1.15.1
- sharebymail: 1.22.0
- text: 6.0.1
- theming: 2.7.0
- twofactor_backupcodes: 1.21.0
- updatenotification: 1.22.0
- user_ldap: 1.23.0
- viewer: 5.0.0-dev.0
- workflowengine: 2.14.0
Disabled:
- admin_audit: 1.22.0
- app_api: 32.0.0 (installed 5.0.2)
- circles: 32.0.0 (installed 31.0.0)
- contactsinteraction: 1.13.1 (installed 1.12.0)
- dashboard: 7.12.0 (installed 7.11.0)
- encryption: 2.20.0
- files_reminders: 1.5.0 (installed 1.4.0)
- files_versions: 1.25.0 (installed 1.25.0)
- firstrunwizard: 5.0.0-dev.0 (installed 5.0.0-dev.0)
- nextcloud_announcements: 4.0.0-dev.0 (installed 3.0.0)
- support: 4.0.0-dev.0 (installed 3.0.0)
- survey_client: 4.0.0-dev.0 (installed 3.0.0)
- suspicious_login: 10.0.0-dev.0
- systemtags: 1.22.0 (installed 1.21.1)
- twofactor_nextcloud_notification: 6.0.0-dev.0
- twofactor_totp: 14.0.0
- user_status: 1.12.0 (installed 1.11.0)
- weather_status: 1.12.0 (installed 1.12.0)
- webhook_listeners: 1.3.0 (installed 1.2.0)
Nextcloud configuration
{
"system": {
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": {
"0": "localhost",
"7": "nextcloudpi",
"5": "nextcloudpi.local",
"8": "nextcloudpi.lan",
"***REMOVED SENSITIVE VALUE***",
},
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "32.0.5.0",
"overwrite.cli.url": "***REMOVED SENSITIVE VALUE***",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"memcache.local": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 0,
"timeout": 0,
"password": "***REMOVED SENSITIVE VALUE***"
},
"filelocking.enabled": true,
"tempdirectory": "\/opt\/ncdata\/data\/tmp",
"mail_smtpmode": "smtp",
"mail_smtpauthtype": "LOGIN",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"preview_max_x": "2048",
"preview_max_y": "2048",
"jpeg_quality": "60",
"overwriteprotocol": "https",
"maintenance": false,
"logfile": "\/opt\/ncdata\/data\/nextcloud.log",
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"loglevel": 2,
"log_type": "file",
"htaccess.RewriteBase": "\/",
"maintenance_window_start": 2,
"default_phone_region": "33",
"app_install_overwrite": {
"1": "previewgenerator",
"2": "nextcloudpi",
"3": "files_downloadactivity"
},
"ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
"mail_sendmailmode": "smtp",
"mail_smtpsecure": "ssl",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpauth": true,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"theme": ""
}
}
Activity
Glujaz commentedon Jan 20, 2026
If I remember it correctly, it was recommanded to tag @chadek :)
chadek commentedon Sep 15, 2026
Fixed for v0.4.0, by #396. The part of your report that pointed at it is "as done by the internal cron job": saving really did depend on cron, and on the last participant having left as well, so a document open in a tab was never written no matter how the cron was configured.
What was wrong. The editor's "all changes are saved" meant the changes had reached this server's database, not that they had reached the file. Nothing wrote the file until the last participant had left and the
Cleanupbackground job had run. On an instance whose cron is slow, misconfigured, or set to AJAX, a document could be edited all day with nothing on disk — and a browser closed at the wrong moment lost the lot. Worse, the server never noticed an editor leaving at all: a document server that holds a WebSocket learns of it from the socket closing, but this one is polled over HTTP, so the pending poll was simply dropped and nothing ran to notice.What changed (#396, and #387 for the session accounting):
autosave_interval(60 s by default,0turns it off) since the last write — from the editing path itself, not from the background job. It costs one document assembly per interval per document being edited, however much is typed in between, and none at all while nobody is typing.closecommand, and a beacon sent by the page hosting the editor frame (it has to be the host page — a request started by a frame that is being detached is cancelled with it).To change the interval:
Proof. Two regression tests, driving real editors in headless chromium and reading the file on disk after each step — no cron, no
occ documentserver:flushanywhere in the run. Againstmasterjust now, Nextcloud 34, ONLYOFFICE connector 10.1, bundled Euro-Office 9.3.4:tests/rig/autosave_test.py— the file is written while the document is open:Step 1 is the whole issue: the text is in the Nextcloud file seconds after being typed, with the document still open. Step 2 is the cost control — a save inside the interval must not re-assemble the document. Step 4 is closing the editor: everything is in the file and the document is disposed of on the spot.
tests/rig/leave_test.py— two participants, and nobody runs anything:Step 2 is the other half of it — one person leaving must not end the document for everybody else — and step 5 reopens the file and asks the editor's own document model what it displays, rather than trusting the write.
The whole suite is green on
masteras of this comment:formats,smoke(every format opens, edits and reaches the file),flush-live,autosave,leave,twotab,coedit,coedit-xlsx,forcesave,chat. It runs in CI on pull requests and weekly, so this does not quietly regress again.