QC is not thread safe
smathieu opened this issue · 2 comments
smathieu commented
In version 3.1RC1
If you're using a forking worker such as puma, the QC.default_conn_adapter
method gets memorized globally. Since each thread normally have their own db connection, the DB connection used by QC will be a different one to the one used by the web process.
This breaks transaction isolation and can create crashes that are very painful to debug.
ukd1 commented