3 ms·
In the case of rails, using multiple threads will checkout extra database connections. Database connections are often a limited resource though, so it is not w
by yxhuvud 3y ago
In the case of rails, using multiple threads will checkout extra database connections.
Database connections are often a limited resource though, so it is not without peril.
- kayodelycaon 3y agoWell yes. That's how a connection pool works. You're not really supposed to be creating extra threads inside a request. Things can get wonky unless you know what you're doing. Best to use ActiveJob, which will have its own context even if it uses threads underneath.