Howard Chu writes:
My approach for that was to set the NOWAIT flag on the read txns, but that eats up too much CPU because most of our code immediately retries whenever it sees the DB_LOCK_NOTGRANTED result. I've removed the NOWAIT flag again. Still looking at the impact of this change.
Is this the kind of situation where it can help to retry at increasing and somewhat randomized intervals until it succeeds? (Randomized so two threads won't keep getting in each others' way.)