3 ms·
That would be the FD limit, divided by 3 (the DB itself, the shm file and the WAL).
by julik 1y ago
That would be the FD limit, divided by 3 (the DB itself, the shm file and the WAL).
- ncruces 1y agoBut each SQLite connection (even to the same DB) will also consume 2 FDs for the DB and the WAL. You'll more easily pool connections to the same DB, of course, but the difference might not be so stark.
- julik 1y agoSomething like that, yes. A tenant that hasn't been opened yet - well, you create the tenant first, and then proceed "as normal". With ActiveRecord, your `pool:` configuration defines how many database handles you want to keep open at the same time. I set it relatively high but it can be tweaked, I'd say. And there is automatic eviction from the pool, so if you have a few sites which are popular and a lot of sites which are not popular - it should balance out. There could be merit to "open and close right after" though, for sure.