[SELF-HOSTED] Error: SQLITE_BUSY: unable to close due to unfinalized statements or unfinished backups
Closed this issue · 2 comments
Describe the current behavior
Hello, I regularly get this Error: SQLITE_BUSY: unable to close due to unfinalized statements or unfinished backups after an attempt to backup a doc by Grist. Followed by a Sandbox exited with code null signal SIGKILL, then backupSqliteDatabase: stopped copy of /persist/docs/<docId>.grist (backup) and HostedStorageManager error pushing <docId>(1): Error: source closed. This triggers a FlexServer cleanup but fails with a Cleanup error for 'FlexServer.\_shutdown' handler: TimeoutError: operation timed out and then the Grist server crashes with exit code 1. Do you have any idea how I could solve this ?
Steps to reproduce
Describe the expected behavior
No response
Where have you encountered this bug?
- On docs.getgrist.com
- On a self-hosted instance
Instance information (when self-hosting only)
-
Grist instance:
- Version: 1.3.3
- URL (if it's OK for you to share it):
- Installation mode: docker
- Architecture: single-worker
-
Browser name, version and platforms on which you could reproduce the bug:
-
Link to browser console log if relevant:
-
Link to server log if relevant:
I know the issue: doc grist too big with 1.4Gb attachments
Hi @tristanrobert, thanks for reporting this. Backup behavior has been changed recently (just before and just after 1.3.3 release) so I'd be interested in your (redacted) logs if you have time. There may be something to fix here.
Depending on when this occurs, you may be able to reduce the odds of it happening by giving ActiveDoc operations more time to complete. Setting NODE_ENV=production has an impact:
grist-core/app/server/lib/ActiveDoc.ts
Line 168 in 3d145bb
Separately, support for storing attachments externally is coming soon! A lot of it is already there, except the UI.