Skip to content
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

[SELF-HOSTED] Error: SQLITE_BUSY: unable to close due to unfinalized statements or unfinished backups #1427

Closed
1 of 2 tasks
tristanrobert opened this issue Feb 6, 2025 · 2 comments

Comments

@tristanrobert
Copy link
Contributor

tristanrobert commented Feb 6, 2025

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?

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:

@tristanrobert
Copy link
Contributor Author

I know the issue: doc grist too big with 1.4Gb attachments

@paulfitz
Copy link
Member

paulfitz commented Feb 6, 2025

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:

const ACTIVEDOC_TIMEOUT = (process.env.NODE_ENV === 'production') ? 30 : 5;

Separately, support for storing attachments externally is coming soon! A lot of it is already there, except the UI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants