Database locked?


I get an error message all the time on the CLI:
" WARNING[13486]: db.c:288 db_execute_sql: Error executing SQL (COMMIT): database is locked"
But, when I check, I have no problem to connect to my databases in mysql server.

I don’t know what it means and how can I fix this problem?

Thank you in advance,

I believe that lock refers to your asterisk sqlte3 database.

My databases are :

information_schema asterisk asteriskcdrdb mysql qstats test

Where do you find the asterisk sqlte3 database?

Usually /var/lib/asterisk/

I can read it with Vim, but I don’t know if that what’s you want to say?

You would need to use an sqlite3 client to make sense of that file.

rasterisk -x “database show”

will “dump” it’s content. ( redirect that into a text file also JIC.)

If restarting asterisk doesn’t fix it and you have no other process using it (which is unlikely apart from occasionally FreePBX reloads), I would probably rename that file while asterisk is stopped, It should be rebuilt on an asterisk start. You will loose some “state” like blacklists etc. but if they are important you can retrieve that from your dump file.

For reference