Seafile on Raspi: Version 6.0.4 Database is locked error

I am running Seafile Server Version 6.0.4 on a Raspi. My database is sqlite3.
I am constantly obtaining the following errors:

[10/16/16 22:23:13] …/common/seaf-db.c(424): Error prepare statement SELECT 1 FROM Repo WHERE repo_id=?: sqlite3_prepare_v2 failed: database is locked.
[10/16/16 22:23:13] http-server.c(733): DB error when check repo existence.
[10/16/16 22:23:14] …/common/seaf-db.c(584): Error get next result from prep stmt: sqlite3_step failed: database is locked.
[10/16/16 22:23:14] http-server.c(733): DB error when check repo existence.
[10/16/16 22:23:14] …/common/seaf-db.c(584): Error get next result from prep stmt: sqlite3_step failed: database is locked.
[10/16/16 22:23:14] http-server.c(733): DB error when check repo existence.
[10/16/16 22:23:17] …/common/seaf-db.c(804): Start transaction failed: begin transaction failed: cannot start a transaction within a transaction.
[10/16/16 22:23:17] …/common/seaf-db.c(804): Start transaction failed: begin transaction failed: cannot start a transaction within a transaction.
[10/16/16 22:23:17] …/common/seaf-db.c(804): Start transaction failed: begin transaction failed: cannot start a transaction within a transaction.
[10/16/16 22:23:17] …/common/seaf-db.c(804): Start transaction failed: begin transaction failed: cannot start a transaction within a transaction.
[10/16/16 22:23:18] …/common/seaf-db.c(804): Start transaction failed: begin transaction failed: cannot start a transaction within a transaction.
[10/16/16 22:23:18] …/common/seaf-db.c(804): Start transaction failed: begin transaction failed: cannot start a transaction within a transaction.
[10/16/16 22:23:19] …/common/seaf-db.c(584): Error get next result from prep stmt: sqlite3_step failed: database is locked.
[10/16/16 22:23:19] http-server.c(733): DB error when check repo existence.
[10/16/16 22:23:19] …/common/seaf-db.c(424): Error prepare statement SELECT 1 FROM Repo WHERE repo_id=?: sqlite3_prepare_v2 failed: database is locked.
[10/16/16 22:23:19] http-server.c(733): DB error when check repo existence.
[10/16/16 22:23:19] …/common/seaf-db.c(584): Error get next result from prep stmt: sqlite3_step failed: database is locked.
[10/16/16 22:23:19] http-server.c(733): DB error when check repo existence.
[10/16/16 22:23:20] …/common/seaf-db.c(584): Error get next result from prep stmt: sqlite3_step failed: database is locked.
[10/16/16 22:23:20] http-server.c(733): DB error when check repo existence.
[10/16/16 22:23:36] …/common/seaf-db.c(804): Start transaction failed: begin transaction failed: cannot start a transaction within a transaction.

I noticed the errors when my Seafile Upload on my Android Smartphone stopped working.

Does anybody know help?
Do I need to provide additional information?

Have you cleanly stop all seafile processes before starting a new instance? Do you have many clients connected to the server?

What’s the output of ps aux | grep seaf-server? How many seaf-server processes can you see?

Similar errors here. Appeared after upgrading to version 6.
Runing on debian 7 with sqlite3

I am obtaining only one single instance of seafile

seafile 932 0.4 1.3 493476 12572 ? Ssl Oct16 17:18 seaf-server -F /home/seafile/haiwen/conf -c /home/seafile/haiwen/ccnet -d /media/usbstick/seafile -l /home/seafile/haiwen/logs/seafile.log -P /home/seafile/haiwen/pids/seaf-server.pid
pi 15112 0.0 0.2 4280 2016 pts/0 S+ 21:58 0:00 grep --color=auto seaf-server

Can I provide any more information?

I believe I’ve found the cause of this issue. In 6.0 version, we replaced libzdb with our own database access code. The new code missed a little bit settings when opening sqlite connections. That makes it much easier to produce conflicts between transactions. We’ll provide a test version next Monday.
@rcoss As the rpi version is usually updated later, would you test it on Debian?

Sure, just send a link to download.
System is debian 7, 64 bits.

Here is the link: https://seacloud.cc/f/f0d55fc6e1/?raw=1

I’m getting this:
Reported Unwanted Software Page!

This web page at seacloud.cc has been reported to contain unwanted software and has been blocked based on your security preferences.

from your link!

Yeah, seacloud.cc is a public service so it could be affected by some user-uploaded content.

I re-uploaded it to our official download site. Check https://download.seafile.com/f/c3908ba991/

Downloaded and installed v.6.0.6 from https://seacloud.cc/f/f0d55fc6e1/?raw=1. It has been running for 48hs and no errors logged so far.

1 Like

Thanks. We’ll update the package soon.

Is there an ARM version of this package? I’m having the same issue and it caught me right during a migration. The copied database has this problem, the original still works, somehow.

The issue is fixed in 6.0.6.
Thank you