zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.2k stars 1.9k forks source link

Sync failed: Cannot create a string longer than 0x1fffffe8 characters(Bug report) #3108

Closed e-p-s closed 2 years ago

e-p-s commented 2 years ago

Trilium Version

windows-x64-0.54.3 + windows-x64-0.54.2

What operating system are you using?

Windows

What is your setup?

Local + server sync

Operating System Version

10Pro 21H1

Description

cant sync anymore....

i sadly didnt know what i can add to help support.

zadam commented 2 years ago

Hello, there was already an occurence of this in #2688

Did you upload a very large file before this started to happen?

zadam commented 2 years ago

To unblock the sync you can execute the following:

UPDATE note_contents SET content = '' WHERE LENGTH(content) > 250000000;

and then:

UPDATE note_revision_contents SET content = '' WHERE LENGTH(content) > 250000000;

This can be executed in the SQL console:

image

Note that this will delete the contents of all notes larger than 250 000 000 bytes. Trilium isn't built to handle such large files and they will fail to sync.

e-p-s commented 2 years ago

Last thing i remeber was, take a web clipper "shot" from this side:

https://github.com/awesome-selfhosted/awesome-selfhosted

sql1: UPDATE note_contents SET content = '' WHERE LENGTH(content) > 250000000; { "changes": 13, "lastInsertRowid": 56340 }

sql2: UPDATE note_revision_contents SET content = '' WHERE LENGTH(content) > 250000000; { "changes": 0, "lastInsertRowid": 56342 }

yes. the sync is working again. thanks for your quick reply.