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

(Bug report) ERROR: put /api/special-notes/api-script-launcher threw exception: 'disk I/O error', stack: SqliteError: disk I/O error #909

Open
Snake883 opened this issue Jan 9, 2025 · 1 comment

Comments

@Snake883
Copy link

Snake883 commented Jan 9, 2025

Description

When trying to create/edit a note, I receive errors "'disk I/O error', stack: SqliteError: disk I/O error".
anonymized-full-2025-01-09T215108.zip

No problems viewing the notes.
I did not have this problem a few days ago.

I am running TrilliumNext via docker container (https://hub.docker.com/r/triliumnext/notes).

TriliumNext Version

0.90.12

What operating system are you using?

Other Linux

What is your setup?

Local (no sync)

Operating System Version

Linux ced8e64d950c 6.1.118-Unraid #1 SMP PREEMPT_DYNAMIC Thu Nov 21 15:54:38 PST 2024 x86_64 Linux

Error logs

(node:1) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use node --trace-warnings ... to show where the warning was created)
at http://192.168.1.7:8080/assets/v0.90.12/app-dist/desktop.js:1:79720
200 GET /api/health-check with 15 bytes took 2ms
200 GET /api/health-check with 15 bytes took 7ms
200 GET /api/health-check with 15 bytes took 2ms
Slow 200 GET /api/health-check with 15 bytes took 11ms
200 GET /api/health-check with 15 bytes took 4ms
200 GET /api/health-check with 15 bytes took 1ms
200 GET /api/health-check with 15 bytes took 5ms
200 GET /api/health-check with 15 bytes took 2ms
Caught interrupt/termination signal. Exiting.
No USER_UID specified, leaving 1000
No USER_GID specified, leaving 1000
The database connection is not open
DB not initialized, please visit setup page - http://[your-server-host]:8080 to see instructions on how to initialize Trilium.
The database connection is not open
(node:1) ExperimentalWarning: Importing JSON modules is an experimental feature and might change at any time
(Use node --trace-warnings ... to show where the warning was created)
DB size: null KB
{
"appVersion": "0.90.12",
"dbVersion": 228,
"nodeVersion": "v20.15.1",
"syncVersion": 33,
"buildDate": "2024-09-07T18:36:34Z",
"buildRevision": "7c0d6930fa8f20d269dcfbcbc8f636a25f6bb9a7",
"dataDirectory": "/home/node/trilium-data",
"clipperProtocolVersion": "1.0",
"utcDateTime": "2025-01-09T21:42:16.221Z"
}
CPU model: AMD Athlon(tm) II X4 635 Processor, logical cores: 4, freq: 2900 Mhz
Trusted reverse proxy: false
App HTTP server starting up at port 8080
Listening on port 8080
websocket client connected
Caught interrupt/termination signal. Exiting.
No USER_UID specified, leaving 1000
No USER_GID specified, leaving 1000
Slow query took 65ms: SELECT value FROM options WHERE name = 'initialized'
Slow query took 141ms: SELECT * FROM options WHERE name = ?
DB size: 7036 KB
Becca (note cache) load took 858ms
Slow query took 21ms: SELECT value FROM options WHERE name = 'dbVersion'
{
"appVersion": "0.90.12",
"dbVersion": 228,
"nodeVersion": "v20.15.1",
"syncVersion": 33,
"buildDate": "2024-09-07T18:36:34Z",
"buildRevision": "7c0d6930fa8f20d269dcfbcbc8f636a25f6bb9a7",
"dataDirectory": "/home/node/trilium-data",
"clipperProtocolVersion": "1.0",
"utcDateTime": "2025-01-09T21:43:55.032Z"
}
CPU model: AMD Athlon(tm) II X4 635 Processor, logical cores: 4, freq: 2900 Mhz
Trusted reverse proxy: false
App HTTP server starting up at port 8080
Listening on port 8080
Slow query took 42ms: SELECT COUNT(1) FROM notes
Slow query took 29ms: SELECT COUNT(1) FROM blobs
Table counts: notes: 536, revisions: 112, attachments: 59, branches: 557, attributes: 353, etapi_tokens: 0, blobs: 550
Slow query took 196ms: SELECT noteId as entityId FROM notes LEFT JOIN entity_changes ec ON ec.entityName = 'notes' AND ec.entityId = notes.noteId WHERE ec.id IS NULL
Slow query took 78ms: SELECT id, entityId FROM entity_changes LEFT JOIN notes ON entityId = notes.noteId WHERE entity_changes.isErased = 0 AND entity_changes.entityName = 'notes' AND notes.noteId IS NULL
Slow query took 47ms: SELECT id, entityId FROM entity_changes LEFT JOIN blobs ON entityId = blobs.blobId WHERE entity_changes.isErased = 0 AND entity_changes.entityName = 'blobs' AND blobs.blobId IS NULL
Slow query took 36ms: SELECT id, entityId FROM entity_changes JOIN blobs ON entityId = blobs.blobId WHERE entity_changes.isErased = 1 AND entity_changes.entityName = 'blobs'
Slow query took 34ms: SELECT branchId as entityId FROM branches LEFT JOIN entity_changes ec ON ec.entityName = 'branches' AND ec.entityId = branches.branchId WHERE ec.id IS NULL
Slow query took 45ms: SELECT id, entityId FROM entity_changes LEFT JOIN branches ON entityId = branches.branchId WHERE entity_changes.isErased = 0 AND entity_changes.entityName = 'branches' AND branches.branchId IS NULL
Slow query took 29ms: SELECT id, entityId FROM entity_changes JOIN branches ON entityId = branches.branchId WHERE entity_changes.isErased = 1 AND entity_changes.entityName = 'branches'
Slow query took 110ms: SELECT attributeId as entityId FROM attributes LEFT JOIN entity_changes ec ON ec.entityName = 'attributes' AND ec.entityId = attributes.attributeId WHERE ec.id IS NULL
Slow query took 46ms: SELECT id, entityId FROM entity_changes JOIN attributes ON entityId = attributes.attributeId WHERE entity_changes.isErased = 1 AND entity_changes.entityName = 'attributes'
Slow query took 32ms: SELECT id, entityId FROM entity_changes LEFT JOIN etapi_tokens ON entityId = etapi_tokens.etapiTokenId WHERE entity_changes.isErased = 0 AND entity_changes.entityName = 'etapi_tokens' AND etapi_tokens.etapiTokenId IS NULL
Slow query took 101ms: SELECT branchId, branches.parentNoteId AS parentNoteId FROM branches LEFT JOIN notes ON notes.noteId = branches.parentNoteId WHERE branches.isDeleted = 0 AND branches.noteId != 'root' AND notes.noteId IS NULL
Slow query took 32ms: SELECT DISTINCT notes.noteId FROM notes LEFT JOIN branches ON notes.noteId = branches.noteId AND branches.isDeleted = 0 WHERE notes.isDeleted = 0 AND branches.branchId IS NULL
Slow query took 792ms: SELECT notes.noteId, notes.type, notes.mime FROM notes JOIN blobs USING (blobId) WHERE isDeleted = 0 AND isProtected = 0 AND content IS NULL
Slow query took 41ms: SELECT revisions.revisionId, blobs.blobId FROM revisions LEFT JOIN blobs USING (blobId) WHERE blobs.blobId IS NULL
Slow query took 22ms: SELECT parentNoteId FROM branches JOIN notes ON notes.noteId = branches.parentNoteId WHERE notes.isDeleted = 0 AND notes.type == 'search' AND branches.isDeleted = 0
Slow query took 29ms: SELECT attributeId FROM attributes WHERE isDeleted = 0 AND type = 'relation' AND value = ''
Slow query took 35ms: SELECT attributeId, attributes.noteId FROM attributes JOIN notes ON attributes.noteId = notes.noteId WHERE attributes.isDeleted = 0 AND notes.isDeleted = 1
Slow query took 47ms: SELECT attributeId, attributes.value AS targetNoteId FROM attributes JOIN notes ON attributes.value = notes.noteId WHERE attributes.type = 'relation' AND attributes.isDeleted = 0 AND notes.isDeleted = 1
Slow query took 27ms: SELECT DISTINCT name FROM attributes
All consistency checks passed with no errors detected (took 2386ms)
Slow 200 GET /api/health-check with 15 bytes took 163ms
Slow query took 34ms: SELECT name FROM sqlite_master WHERE type = 'table' AND name = 'options'
Slow query took 29ms: SELECT value FROM options WHERE name = 'initialized'
Slow query took 25ms: SELECT value FROM options WHERE name = 'passwordVerificationHash'
200 GET /api/health-check with 15 bytes took 2ms
websocket client connected
websocket client connected
Slow 200 GET /api/health-check with 15 bytes took 75ms

@eliandoran
Copy link
Contributor

@Snake883 , this appears to be something related to your environment as the error comes from SQLite, our database engine.

How is the database/Trilium data directory mounted to the container?

If you are using some kind of network share such as NFS, that's most likely the reason.

See https://stackoverflow.com/questions/29244788/error-disk-i-o-error-on-a-newly-created-database

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