Koozali.org: home of the SME Server

DB error on create Trunk

Offline jameswilson

  • *
  • 795
  • +0/-0
    • Security Warehouse, professional security equipment
DB error on create Trunk
« 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?

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: DB error on create Trunk
« Reply #1 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





   

Offline jameswilson

  • *
  • 795
  • +0/-0
    • Security Warehouse, professional security equipment
Re: DB error on create Trunk
« Reply #2 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?

Offline compsos

  • *
  • 472
  • +0/-0
Re: DB error on create Trunk
« Reply #3 on: September 20, 2012, 02:21:25 AM »
ALso found doing svc -t /service/httpd-srk/ clears the locked DB issue
Regards

Gordon............

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: DB error on create Trunk
« Reply #4 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