kutt
kutt copied to clipboard
i beleive container is crashing idk why
here are some logs
> [email protected] migrate
> knex migrate:latest
Already up to date
npm notice
npm notice New major version of npm available! 10.9.2 -> 11.2.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v11.2.0
npm notice To update run: npm install -g [email protected]
npm notice
> [email protected] start
> node server/server.js --production
> Ready on http://localhost:3000
/kutt/node_modules/knex/lib/dialects/better-sqlite3/index.js:39
const response = await statement.all(bindings);
^
SqliteError: select * from `links` where `expire_in` < '2025-03-23 06:04:49' - database is locked
at Client_BetterSQLite3._query (/kutt/node_modules/knex/lib/dialects/better-sqlite3/index.js:39:40)
at executeQuery (/kutt/node_modules/knex/lib/execution/internal/query-executioner.js:37:17)
at Client_BetterSQLite3.query (/kutt/node_modules/knex/lib/client.js:154:12)
at Runner.query (/kutt/node_modules/knex/lib/execution/runner.js:141:36)
at ensureConnectionCallback (/kutt/node_modules/knex/lib/execution/internal/ensure-connection-callback.js:13:17)
at Runner.ensureConnection (/kutt/node_modules/knex/lib/execution/runner.js:318:20)
at async Runner.run (/kutt/node_modules/knex/lib/execution/runner.js:30:19)
at async Object.batchRemove (/kutt/server/queries/link.queries.js:250:17) {
code: 'SQLITE_BUSY'
}
Node.js v22.13.1
Same problem! I'm running Kutt (v3.2.2) with better-sqlite3 and keep getting a "SQLITE_BUSY: database is locked" error when querying the links table. Tried checking for locked processes, increasing acquireTimeoutMillis, and enabling WAL mode, but no luck.
Could this be due to long-running queries or unclosed connections in link.queries.js? Any ideas on how to fix it?
here is my compose file for reference. (please fix). TIA.
kutt:
image: kutt/kutt:latest
container_name: kutt
volumes:
- /docker/kutt/db_data_sqlite:/var/lib/kutt
- /docker/kutt/custom:/kutt/custom
environment:
DB_FILENAME: "/var/lib/kutt/data.sqlite"
REDIS_ENABLED: true
REDIS_HOST: kutt_redis
REDIS_PORT: 6379
JWT_SECRET: xxx #random string of characters
DEFAULT_DOMAIN: xxx #no http or https
ports:
- 3000:3000
depends_on:
kutt_redis:
condition: service_started
logging:
options:
max-size: 10m
restart: always
kutt_redis:
image: redis:alpine
container_name: kutt_redis
restart: always
expose:
- 6379
logging:
options:
max-size: 10m