SVN Database is Locked
Question:
Why am I getting messages like 'svn: E200033: database is locked'?
Solution:
1. SQLlite Exclusive Locking
From version 1.7, Subversion uses a sqlite database to store the working copy metadata and by default, svn operations do not lock the sqlite database which can lead to poor performance on NFS. Details here:
SQLite exclusive locking discussion on Svn Developers mailing list
From Subversion 1.8, there is a configuration option to enable SQLite exclusive locking:
http://subversion.apache.org/docs/release-notes/1.8.html
This can improve the performance of Subversion workspaces on NFS by 5X - 10X
The downside of SQLlite exclusive locking is that many svn operations are now blocking; it's not possible to run more than one svn command at the same time on a working copy. Attempting to do so will result in an error message like:
svn: E200033: database is locked, executing statement 'PRAGMA synchronous=OFF;PRAGMA recursive_triggers=ON;
Perforce IPLM runs svn commands in series, so you should not encounter this message in normal usage, but you may see this if another application is accessing the working copy (for example, you are running svn commands in a terminal).
Summary:
Do not run svn commands in parallel on the same working copy.
Perforce can also ship a custom subversion 1.7 client which has SQLite exclusive locking hardwired, since no configuration option was available in 1.7
2. NFS Configuration
If you are not running the nfslock service, you may get the 'database is locked' message. See this thread:
Summary:
I ran the nfslock service and the svn is working fine now.
3. Working copy on CIFS
Summary:
Use the nobrl option when mounting a CIFS partition.