3

I am facing this issue intermittently when I am trying to check-in files

svn ci -m "commit message" file
Warning: post commit FS processing had error:
sqlite[S5]: database is locked 

Some more info
Server side OS --> Centos6.5 and svn version 1.8.5 
Client Side OS --> Centos 5.11 and svn version 1.7.7

I already check some forums and these are the suggestion but it doesn't resolve my issue

1: Check server load(Server is fairly idle when I faced this issue..checked load average,IO and memory utilization)
2: There is a longer commit is in progress at that time
3: Both server and client are in same geographic location

As the error is intermittent and I checked svn repo file is there(i.e file checked in properly)so I am not sure what is the issue.Any help is really appreciated.

5
+25

I believe this is a client side, and not server side error, based on your comments it seems you are using file based svn, so the only database that can be locked is on the client.

Try this

$ cd /my/repository/.svn
$ mv wc.db wc.db.old
$ sqlite3 wc.db.old
sqlite> .backup main wc.db
sqlite> .exit

now you have a new wc.db that should not have any locking errors

If it all works OK, delete wc.db.old

If not you can always

$ mv wc.db.old wc.db

and you will be right back where you stated before I Posted this .....

but it should work ....

  • Thanks David. Yes that is correct we are file based svn.The Solution you posted I already tried this earlier and as I mentioned issue is intermittent so not sure how to replicate it. – Prashant Lakhera Jun 12 '15 at 21:30
  • I have many projects in my workingspace, Do we have a way to do it faster? – vanduc1102 Sep 29 '16 at 2:41
  • mv: cannot move `wc.db' to `wc.db.old': Text file busy lsof wc.db turns up empty. any other idea? – Sascha Dec 21 '17 at 13:20
0

In case you use symbolic links on your file system, note that SVN can get confused as well.

My local SVN directory is a actually directory symlink to the real local SVN repo folder.

Let's see how this can go wrong while moving files for instance:

In order to move a file with turtoise svn you can cut (CTRL-X) the files using Windows explorer first, then select Paste from the turtoise SVN context menu.

Normally a SVN popup appears and SVN will move your files inside the repo. However now the "database is locked" messsage appears.

What happened?

Well, upon further inspection, it turns out the directory path changes while I am navigating around in explorer from the 'source' directory to the 'destination' directory of the move.

The reason is the symlink.

When first navigating to the 'source' directory of the move (via the directory symlink), the path is still showing with the symlink name. So far, so good.

But when I navigate to the 'destination' directory, Windows explorer seems to resolve the symlink all of a sudden. Now the path looks different in the address bar.

This seems to confuse SVN, it now probably thinks there are two different repos and the files are being moved from one repo to another?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.