First Jackrabbit 1.6.5 is really old code and if you are able you should upgrade to the latest stable version.
Especially in that part many optimizations have been made.
Do you have changed something in your environment (database, significantly more users,..) ?
I’m asking because we have a similar problem in our environment also running a old jackrabbit instance.
I have made a patch and it looks like it helps but as told before it would be the best to upgrade !