Closed tifDev closed 3 weeks ago
It looks like you are on Linux/macOS.
Do you have multiple containers running AnythingLLM at the same time? This can lock the db and make it read only if 2 containers are trying to access the db at the same time. Another thing that can cause issues like this is if you have the db open in something like DB Browser for SQLite. This can also lock the db and prevent AnythingLLM from writing to it.
How are you running AnythingLLM?
Docker (local)
What happened?
Container crashes while starting
Are there known steps to reproduce?
export STORAGE_LOCATION=$HOME/anythingllm && \ docker run -d -p 3001:3001 \ --cap-add SYS_ADMIN \ -v "${STORAGE_LOCATION}:/app/server/storage" \ -v "${STORAGE_LOCATION}/.env:/app/server/.env" \ -e STORAGE_DIR="/app/server/storage" \ mintplexlabs/anythingllm
[collector] info: Collector hot directory and tmp storage wiped! [collector] info: Document processor app listening on port 8888 Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma
✔ Generated Prisma Client (v5.3.1) to ./node_modules/@prisma/client in 417ms
Start using Prisma Client in Node.js (See: https://pris.ly/d/client)
import { PrismaClient } from '@prisma/client' const prisma = new PrismaClient()
or start using Prisma Client at the edge (See: https://pris.ly/d/accelerate)
import { PrismaClient } from '@prisma/client/edge' const prisma = new PrismaClient()
See other ways of importing Prisma Client: http://pris.ly/d/importing-client
Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Datasource "db": SQLite database "anythingllm.db" at "file:../storage/anythingllm.db"
26 migrations found in prisma/migrations
Error: SQLite database error attempt to write a readonly database 0: sql_schema_connector::sql_migration_persistence::initialize with namespaces=None at schema-engine/connectors/sql-schema-connector/src/sql_migration_persistence.rs:14 1: schema_core::state::ApplyMigrations at schema-engine/core/src/state.rs:201