# Is mutex lock on mongrel needed for activerecord?

**URL:** <https://www.ruby-forum.com/t/is-mutex-lock-on-mongrel-needed-for-activerecord/121657>\
**Category:** Rails\
**Created:** [November 29, 2007, 6:09pm UTC](https://www.ruby-forum.com/t/is-mutex-lock-on-mongrel-needed-for-activerecord/121657 "2007-11-29T18:09:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dusty](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/a183cd/32.png) [@dusty](https://www.ruby-forum.com/u/dusty)\
**Post date:** [November 29, 2007, 6:09pm UTC](https://www.ruby-forum.com/t/is-mutex-lock-on-mongrel-needed-for-activerecord/121657/1 "2007-11-29T18:09:42Z")

</div>

I’ve seen a bunch of posts in various place about whether or not  
mongrel needs to lock when doing activerecord queries. I’m talking  
outside the context of rails here, for example, in a custom mongrel  
handler. It seems to work fine for me without a lock, but I haven’t  
done any extensive testing.

When I ask around, some people say you need that mutex lock with  
activerecord. Some say you don’t because the need with rails is  
really from actionpack. But, most people seem to say something along  
the lines of “in theory you shouldn’t need a lock, but I’d just use  
one”.

I was just wondering if anyone has any insight to whether or not a  
lock is needed when using activerecord in something outside of rails/  
actionpack such as a small mongrel handler.

Thanks for any advice!
