# ActiveRecord validations ignore SQLite3 timeout configuration

**URL:** <https://www.ruby-forum.com/t/activerecord-validations-ignore-sqlite3-timeout-configuration/196984>\
**Category:** Rails\
**Created:** [July 19, 2009, 10:11pm UTC](https://www.ruby-forum.com/t/activerecord-validations-ignore-sqlite3-timeout-configuration/196984 "2009-07-19T22:11:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![evan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/54ee81/32.png) [@evan](https://www.ruby-forum.com/u/evan)\
**Post date:** [July 19, 2009, 10:11pm UTC](https://www.ruby-forum.com/t/activerecord-validations-ignore-sqlite3-timeout-configuration/196984/1 "2009-07-19T22:11:10Z")

</div>

Hey all,

Sorry if this is not the right place, but I could not find anywhere  
more appropriate. I ran into [http://dev.rubyonrails.org/ticket/8811](http://dev.rubyonrails.org/ticket/8811)  
over the past few days, and it’s a very nasty bug. The fact is,  
validates\_uniqueness\_of and validates\_existence\_of (at least) do not  
respect the SQLite3 timeout database configuration, and cause SQLite  
Database Busy exceptions.

The bug was moved to low priority two years ago, but I don’t see how  
this is low priority. We have background threads with SQLite  
connections, so the validations must respect the timeout policy.  
Otherwise the system randomly blows up when trying to create new model  
instances (since that will trigger validations). It’s not that the  
threats truly horde the database, they are quick running tasks. It’s  
just that a single collision will cause an exception due to the  
validations not respecting the timeout policy.

At present we are forced to re-write those validations in a safe way.

Thoughts? Thanks for any advice or consideration.  
[http://dev.rubyonrails.org/ticket/8811](http://dev.rubyonrails.org/ticket/8811)

-Evan Worley
