-
-
Notifications
You must be signed in to change notification settings - Fork 368
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 error: database is locked #2931
Comments
You can try removing |
I run into this problem too. Restarting VSCode fixes it temporarily, but I wonder if there's a better solution? |
According to https://www.sqlite.org/rescode.html#locked it says if not in shared memory mode then this error only occurs if a "conflict" happens on the same connection. So because shared memory is off (I think), then it must be because of a conflict. The only operations I see that might do this after HLS has started up is when indexing hie files ( Another possibility is writes are happening simultaneously at startup somewhere, but there are only a few places that can happen, writer thread startup, and So if my theory is actually right then I guess one way of fixing it is to retry not only on SQLITE_BUSY but SQLITE_LOCKED as well. |
hls-call-hierarchy-plugin had a hiedb write before hls-1.7.0.0, but I never saw errors like this while I'm debugging that, just write here for reference. |
I believe this is the bug being discussed in haskell/vscode-haskell#300 and haskell/vscode-haskell#480 Briefly, it seems the VSCode Haskell extension sometimes starts up more than one HLS. That would explain why you get database lock errors. You will probably see duplicate info on popups driven by HLS as well. |
I am using HLS on a large project with VSCode, and I am being spammed with the following the error:
I've tried restarting HLS and destroying any stack cache (didn't really expect that one to work!). Happy to provide anything else if there's not enough to go on here. I am thinking there's a manual way to clear the lock, but I don't know what that is!
The text was updated successfully, but these errors were encountered: