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

Error Code SQLITE_LOCKED (6): Database Is Locked #15

Closed
gottsohn opened this issue Nov 17, 2016 · 1 comment
Closed

Error Code SQLITE_LOCKED (6): Database Is Locked #15

gottsohn opened this issue Nov 17, 2016 · 1 comment

Comments

@gottsohn
Copy link

This error occurs infrequently when using express-session

@wmertens
Copy link

wmertens commented Aug 7, 2017

The problem is probably that you are using multiple workers? I'm seeing the same, only when using multiple workers.

The solution would be to set the session db to use WAL mode. This does change it to be 3 files instead of one.

To do this manually, do this from the command line:

$ sqlite3 sessions.db 'pragma journal_mode=wal;'
wal

You can do this while your app is running. From then on, it should be fine.

wmertens added a commit to wmertens/connect-sqlite3 that referenced this issue Aug 7, 2017
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

2 participants