Open the lock database read-only when possible The goal is to reduce lock contention, since a read access only requires a shared lock. The improvement should not be significant since for now we open and close the lock database on each HTTP request. PR 36636 [Wilson Felipe <wfelipe gmail.com>]