Environment
- Karakeep 0.31.0
- Also tested with 0.32.0 (same behaviour)
- Docker Compose
- PostgreSQL 16
- Meilisearch 1.12
- Debian 12
Docker Compose
services:
postgres:
image: postgres:16
meilisearch:
image: getmeili/meilisearch:v1.12
karakeep:
image: ghcr.io/karakeep-app/karakeep:0.31.0
environment:
DATABASE_URL: postgresql://karakeep:karakeeppass@postgres:5432/karakeep
NEXTAUTH_SECRET: ***
NEXTAUTH_URL: http://192.168.xxx.xxx:3000
MEILI_HOST: http://meilisearch:7700
MEILI_MASTER_KEY: ***
Only /data is mounted as a volume.
Problem
The container starts successfully and database migrations are executed.
However, the import worker continuously logs:
SqliteError: no such table: importStagingBookmarks
The error repeats every few seconds.
Logs
Running db migration script
...
[import] Starting import polling worker
[import] Error in polling loop:
SqliteError: no such table: importStagingBookmarks
Investigation
I inspected all SQLite databases inside the container.
The migration database contains the expected table:
Using better-sqlite3:
SELECT name
FROM sqlite_master
WHERE type='table'
AND name='importStagingBookmarks';
returns:
However:
/app/apps/web/db.db
/app/apps/workers/db.db
do not contain this table.
In fact, both files are automatically created as empty databases:
/app/apps/web/db.db
Size: 0 bytes
/app/apps/workers/db.db
Size: 0 bytes
/db_migrations/db.db
Size: ~577 KB
Contains importStagingBookmarks
Running the same SQL query shows:
/app/apps/web/db.db
[]
/app/apps/workers/db.db
[]
/db_migrations/db.db
[ { name: 'importStagingBookmarks' } ]
Additional information
- DATABASE_URL is correctly set.
- PostgreSQL is running normally.
- Database migrations complete successfully.
- There are no SQLITE_* environment variables.
- The problem occurs on both 0.31.0 and 0.32.0.
Expected behaviour
The import worker should use the migrated SQLite database (or create the required schema automatically) instead of opening a newly created empty database.
Actual behaviour
The import worker appears to open an empty SQLite database located at:
which results in:
SqliteError: no such table: importStagingBookmarks
and the import worker never becomes functional.
Any ideas what could cause the worker to use a different SQLite database than the migration process?
produced with Chat GPD
Environment
Docker Compose
Only
/datais mounted as a volume.Problem
The container starts successfully and database migrations are executed.
However, the import worker continuously logs:
The error repeats every few seconds.
Logs
Investigation
I inspected all SQLite databases inside the container.
The migration database contains the expected table:
Using better-sqlite3:
returns:
However:
do not contain this table.
In fact, both files are automatically created as empty databases:
Running the same SQL query shows:
Additional information
Expected behaviour
The import worker should use the migrated SQLite database (or create the required schema automatically) instead of opening a newly created empty database.
Actual behaviour
The import worker appears to open an empty SQLite database located at:
which results in:
and the import worker never becomes functional.
Any ideas what could cause the worker to use a different SQLite database than the migration process?
produced with Chat GPD