Koozali.org: home of the SME Server

Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: jameswilson on July 07, 2012, 08:55:02 PM

Title: DB error on create Trunk
Post by: jameswilson on July 07, 2012, 08:55:02 PM
Quote
Software error:

DBD::SQLite::db do failed: database is locked(5) at dbdimp.c line 403 at /opt/sark/perl/modules/sark/SarkSubs.pm line 1026.
For help, please send mail to the webmaster (admin@aelintra.local), giving this error message and the time and date of the error.

I am trying to add a trunk (sipgate) and i get this error message. It claims db is locked. How do i unlock it?
Title: Re: DB error on create Trunk
Post by: SARK devs on July 08, 2012, 09:25:21 PM
is it permanently locked?  If you try to add the record again does it always come back as locked?

can you manually open it? - at the cli do...

Code: [Select]
sqlite3 /opt/sark/db/sark.db
to exit sqlite do

Code: [Select]
.exit
Kind REgards

S





   
Title: Re: DB error on create Trunk
Post by: jameswilson on July 08, 2012, 09:43:20 PM
Ah
Just tried again and it was fine. But that was after i tried the above command. Why would it be locked though?
Title: Re: DB error on create Trunk
Post by: compsos on September 20, 2012, 02:21:25 AM
ALso found doing svc -t /service/httpd-srk/ clears the locked DB issue
Title: Re: DB error on create Trunk
Post by: SARK devs on September 21, 2012, 10:30:12 AM
It can lock when you are doing maintenance on the database but it should clear on a retry.  We can't cure it because there are times when the database really does lock as a result of the running PBX doing an update, the most common being the time-segment update which runs every 5 minutes.  The lock should only live a very short time but if you catch it then you will get bounced.  I'm looking at making it a little more graceful in 4.

 
Best

S