Skip to content

CRITICAL: Database Is No Longer Created or Working #437

@neomaitre

Description

@neomaitre

Bug Description

I had to re-create my MCP Basic-Memory Docker Container from scratch and after spending several hours on the topic - I am unable to have a Basic-Memory Server functioning.

The database memory.db is never created in the config directory along with the config.json

I have been running basic-memory with the official docker images for several months, through multiple upgrades as well. I started from zero - defined several docker compose files with basic configuration and observed that even after creating from CLI projects (the data is created as expected, the API works and AI tools can create notes or select projects), but anything regarding persistence is broken.

I tried the latest image and the previous 0.15.2 with the same results.

Environment

Docker Official Image Latest

Additional Context

appuser@4995d0a8d7ef:/app$ basic-memory project status
2025-11-17 16:27:09.728 | INFO | basic_memory.utils:setup_logging:229 - ENV: 'test' Log level: 'INFO' Logging to .basic-memory/basic-memory-api.log
2025-11-17 16:27:09.728 | INFO | basic_memory.config:setup_basic_memory_logging:514 - Basic Memory 0.16.2 (Project: main)
2025-11-17 16:27:17.384 | INFO | basic_memory.services.initialization:initialize_app:158 - Initializing app...
2025-11-17 16:27:17.402 | INFO | basic_memory.db:run_migrations:277 - Running database migrations...
2025-11-17 16:27:25.687 | INFO | basic_memory.db:run_migrations:296 - Migrations completed successfully
2025-11-17 16:27:25.687 | INFO | basic_memory.repository.search_repository:init_search_index:119 - Initializing search index
2025-11-17 16:27:25.891 | ERROR | basic_memory.repository.search_repository:init_search_index:125 - Error initializing search index: (sqlite3.OperationalError) disk I/O error
[SQL:
CREATE VIRTUAL TABLE IF NOT EXISTS search_index USING fts5(
-- Core entity fields
id UNINDEXED, -- Row ID
title, -- Title for searching
content_stems, -- Main searchable content split into stems
content_snippet, -- File content snippet for display
permalink, -- Stable identifier (now indexed for path search)
file_path UNINDEXED, -- Physical location
type UNINDEXED, -- entity/relation/observation

-- Project context
project_id UNINDEXED,  -- Project identifier

-- Relation fields
from_id UNINDEXED,     -- Source entity
to_id UNINDEXED,       -- Target entity
relation_type UNINDEXED, -- Type of relation

-- Observation fields
entity_id UNINDEXED,   -- Parent entity
category UNINDEXED,    -- Observation category

-- Common fields
metadata UNINDEXED,    -- JSON metadata
created_at UNINDEXED,  -- Creation timestamp
updated_at UNINDEXED,  -- Last update

-- Configuration
tokenize='unicode61 tokenchars 0x2F',  -- Hex code for /
prefix='1,2,3,4'                    -- Support longer prefixes for paths

);
]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
2025-11-17 16:27:25.891 | ERROR | basic_memory.db:run_migrations:311 - Error running migrations: (sqlite3.OperationalError) disk I/O error
[SQL:
CREATE VIRTUAL TABLE IF NOT EXISTS search_index USING fts5(
-- Core entity fields
id UNINDEXED, -- Row ID
title, -- Title for searching
content_stems, -- Main searchable content split into stems
content_snippet, -- File content snippet for display
permalink, -- Stable identifier (now indexed for path search)
file_path UNINDEXED, -- Physical location
type UNINDEXED, -- entity/relation/observation

-- Project context
project_id UNINDEXED,  -- Project identifier

-- Relation fields
from_id UNINDEXED,     -- Source entity
to_id UNINDEXED,       -- Target entity
relation_type UNINDEXED, -- Type of relation

-- Observation fields
entity_id UNINDEXED,   -- Parent entity
category UNINDEXED,    -- Observation category

-- Common fields
metadata UNINDEXED,    -- JSON metadata
created_at UNINDEXED,  -- Creation timestamp
updated_at UNINDEXED,  -- Last update

-- Configuration
tokenize='unicode61 tokenchars 0x2F',  -- Hex code for /
prefix='1,2,3,4'                    -- Support longer prefixes for paths

);
]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
2025-11-17 16:27:25.891 | ERROR | basic_memory.services.initialization:initialize_database:35 - Error initializing database: (sqlite3.OperationalError) disk I/O error
[SQL:
CREATE VIRTUAL TABLE IF NOT EXISTS search_index USING fts5(
-- Core entity fields
id UNINDEXED, -- Row ID
title, -- Title for searching
content_stems, -- Main searchable content split into stems
content_snippet, -- File content snippet for display
permalink, -- Stable identifier (now indexed for path search)
file_path UNINDEXED, -- Physical location
type UNINDEXED, -- entity/relation/observation

-- Project context
project_id UNINDEXED,  -- Project identifier

-- Relation fields
from_id UNINDEXED,     -- Source entity
to_id UNINDEXED,       -- Target entity
relation_type UNINDEXED, -- Type of relation

-- Observation fields
entity_id UNINDEXED,   -- Parent entity
category UNINDEXED,    -- Observation category

-- Common fields
metadata UNINDEXED,    -- JSON metadata
created_at UNINDEXED,  -- Creation timestamp
updated_at UNINDEXED,  -- Last update

-- Configuration
tokenize='unicode61 tokenchars 0x2F',  -- Hex code for /
prefix='1,2,3,4'                    -- Support longer prefixes for paths

);
]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
2025-11-17 16:27:25.891 | INFO | basic_memory.services.initialization:reconcile_projects_with_config:50 - Reconciling projects from config with database...
2025-11-17 16:27:25.892 | INFO | basic_memory.services.project_service:synchronize_projects:349 - Synchronizing projects between database and configuration
2025-11-17 16:27:25.921 | ERROR | basic_memory.services.initialization:reconcile_projects_with_config:70 - Error during project synchronization: (sqlite3.OperationalError) disk I/O error
[SQL: SELECT project.id, project.name, project.description, project.permalink, project.path, project.is_active, project.is_default, project.created_at, project.updated_at, project.last_scan_timestamp, project.last_file_count
FROM project
WHERE project.is_active = 1]
(Background on this error at: https://sqlalche.me/e/20/e3q8)
2025-11-17 16:27:25.921 | INFO | basic_memory.services.initialization:reconcile_projects_with_config:71 - Continuing with initialization despite synchronization error
2025-11-17 16:27:25.921 | INFO | basic_memory.services.initialization:initialize_app:165 - App initialization completed (migration running in background if needed)
2025-11-17 16:27:25.921 | INFO | basic_memory.services.initialization:ensure_initialization:186 - Initialization completed successfully: result=None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions