-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQLite3::BusyException: database is locked #84
Comments
Without runnable code, I can't duplicate the problem. |
Same problem (also see http://stackoverflow.com/questions/78801/sqlite3busyexception) blueprints.rbrequire 'machinist/active_record' User.blueprint do user.rbclass EmailValidator < ActiveModel::EachValidator class User < ActiveRecord::Base attr_accessor :password validates :email, validates :password, def encrypt_password def self.encrypted_password(password, password_salt) |
I can't reproduce the issue from that. (At the very least I need code packaged up so I can run it, and the steps needed to trigger the problem.) Odds are this isn't a Machinist issue. The error is SQLite complaining about concurrent requests, and Machinist just makes regular ActiveRecord calls under the hood. |
the problem lies with transactional fixtures, cause |
ok, just saw that there is a simple option to disable caching, works perfectly fine now
|
Caching has been removed from the edge version of Machinist. |
Machinist::ActiveRecord::Blueprint.outside_transaction was creating a second thread and opening up a new connection to SQLite3. This seemed to fail while another transaction was already running in the primary thread. What's odd is that it did work sometimes, but not reliably. I'm guessing that opening up multiple SQLite3 connections through the latest ActiveRecord is just not reliable. Switching to edge fixed the problem for me. Thank you for all your work on an excellent library! |
I have the following error while running some spec, which is using machinist's make!:
SQLite3::BusyException: database is locked
I have simply one blueprint, and when trying to make that blueprint, error as above is being displayed when running rake spec.
The text was updated successfully, but these errors were encountered: