Comments (5)
I honestly don't know much about opening multiple SQLite clients to the same SQLite file, other than it's supposedly supported, but that StackOverflow is similarly full of similar error messages. I'd recommend reading up a little bit on the client's options and then the SQLite wrapper that Suture contains to see if there's a configuration tweak you can apply to get what you need
from suture.
Take a look at sqlite3_busy_timeout
default sqlite will do an instant timeout when trying to access a locked database, you can use this method to ensure it retries after waiting as in sqlite3_busy_timeout( db, 100 );
or better yet take a look at #busy_handler {|count| ... } ⇒ Object which allows you to set a more robust retry - > fail.
This should probably be set in the gem assuming that you will be running in rails environments as you will likely be hitting locked db in most deployments (including dev when running puma such as rails 5).
from suture.
@wadestuart I'm fine with setting sqlite defaults that resolve this issue, but not if it'll cause issues for others (since I'm not assuming that Suture's always used by Rails apps. Anyway if that's the case, I'd love to see a PR that does this
Separately, I'm intentionally tepid about telling people to set up sqlite recordings in production for reasons like this. It simply won't work for lots of types of deployments. What I'd much rather see is a redis wrapper that can be configured as an alternative to sqlite. And I want @samphippen to pay for it, if at all possible
from suture.
😱
from suture.
from suture.
Related Issues (20)
- Suture.create :after_old and :after_new hooks
- Implement Suture.create :call_both
- Suture.create :on_{new,old,subject}_error handler
- Suture.create :call_old_on_error flag
- Document rails env-specific settings HOT 1
- Rails project + production snapshot
- Suture.verify :after_subject hook
- Override flag to disable the seam / revert to old path
- rake test -> rake unit w/ test as default
- common test parent for unit tests
- Log out an error every time a suture raises
- warn if no calls are found for the provided seam name
- Add progress bar HOT 1
- Document expected_error_types feature
- staging/prod: dup arguments
- Justification for building a custom Docker image instead of using the canonical Ruby one
- call_both: if raise_on_result_mismatch is false and return_old_on_result_mismatch is true, rescue errors from :new path HOT 1
- task to explode tests from recorded suture data? HOT 2
- Add a benchmarking mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from suture.