We’ve had issues in the past where a rogue process was keeping a sqlite db locked. I’ve written some code to notify us if this is happening, but need to test it.
How can I deliberately lock up a sqlite database, so that I can check if it’s locked?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Execute these statements:
This will lock whole database until you execute:
For simplicity, you can do this using
sqlite3command line utility.For more info, see documentation.