keto icon indicating copy to clipboard operation
keto copied to clipboard

Errors in memory dsn

Open egorsmth opened this issue 3 years ago • 1 comments

Preflight checklist

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

egorsmth avatar Dec 05 '22 07:12 egorsmth

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.

zepatrik avatar Jan 19 '23 10:01 zepatrik