keto
keto copied to clipboard
Errors in memory dsn
Preflight checklist
- [X] I could not find a solution in the existing issues, docs, nor discussions.
- [X] I agree to follow this project's Code of Conduct.
- [X] I have read and am following this repository's Contribution Guidelines.
- [ ] This issue affects my Ory Network project.
- [ ] I have joined the Ory Community Slack.
- [ ] I am signed up to the Ory Security Patch Newsletter.
Describe the bug
Sometimes there is exception database table is locked: keto_uuid_mappings when running Keto with DSN=memory. I need to run in memory for tests. I guess there is some issue with sqlite configs.
Reproducing the bug
The error is not stable so I couldn't reproduce it. Run keto with DSN=memory
Relevant log output
database table is locked: keto_uuid_mappings`
Relevant configuration
DSN=memory
Version
0.10.0-alpha.0
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Docker
Additional Context
No response
AFAIK sqlite has problems with parallel queries. Can you try reducing the number of parallel requests in your test? In case you want to parallelize your tests, it would be better to use postgres or multiple Keto instances with sqlite in-memory. Cockroachdb also allows running in-memory iirc.