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

SQLITE_BUSY: database is locked #42

Open
FireMasterK opened this issue Jul 10, 2023 · 5 comments
Open

SQLITE_BUSY: database is locked #42

FireMasterK opened this issue Jul 10, 2023 · 5 comments

Comments

@FireMasterK
Copy link
Contributor

Some weird database issues..

Error: SQLITE_BUSY: database is locked
--> in Statement#run({ '$id': 42368, '$reprocessTime': null }, [Function (anonymous)])
    at Database.<anonymous> (/app/node_modules/.pnpm/[email protected]/node_modules/sqlite3/lib/sqlite3.js:76:19)
    at Database.<anonymous> (/app/node_modules/.pnpm/[email protected]/node_modules/sqlite3/lib/sqlite3.js:20:19)
    at <anonymous> (/app/node_modules/.pnpm/github.com+SleeplessOne1917+lemmy-bot@6ed4abbf3e6c343e60ecffa94059b51eae8afbb5_i365mkdgu5davuyz74udnrlrka/node_modules/lemmy-bot/dist/db.js:57:8)
    at new Promise (<anonymous>)
    at upsert (/app/node_modules/.pnpm/github.com+SleeplessOne1917+lemmy-bot@6ed4abbf3e6c343e60ecffa94059b51eae8afbb5_i365mkdgu5davuyz74udnrlrka/node_modules/lemmy-bot/dist/db.js:56:58)
    at <anonymous> (/app/node_modules/.pnpm/github.com+SleeplessOne1917+lemmy-bot@6ed4abbf3e6c343e60ecffa94059b51eae8afbb5_i365mkdgu5davuyz74udnrlrka/node_modules/lemmy-bot/dist/db.js:75:114)
    at Generator.next (<anonymous>)
    at <anonymous> (/app/node_modules/.pnpm/github.com+SleeplessOne1917+lemmy-bot@6ed4abbf3e6c343e60ecffa94059b51eae8afbb5_i365mkdgu5davuyz74udnrlrka/node_modules/lemmy-bot/dist/db.js:8:71) {
  errno: 5,
  code: 'SQLITE_BUSY',
  __augmented: true
}
@Pdzly
Copy link
Contributor

Pdzly commented Jul 11, 2023

I would suggest that you just ignore it and either run it in pm2 or just catch it with

process.on("uncaughtException", (error) => {
console.log("uncaught error:");
console.log(error);
});

@SleeplessOne1917
Copy link
Owner

Could you give some information on your setup? I have a couple of bots running in production and have never encountered this issue.

@FireMasterK
Copy link
Contributor Author

FireMasterK commented Jul 11, 2023

@SleeplessOne1917
Copy link
Owner

I'll try running one of my bots in a docker container. I've used systemd processes for production, so that may be why I haven't experienced issues.

@SleeplessOne1917
Copy link
Owner

@FireMasterK This issue is from several versions ago. Are you still getting this issue?

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

3 participants