Luxaritas
Explore posts from serversPPrisma
•Created by Luxaritas on 10/20/2023 in #help-and-questions
How does Priama handle connection cleanup in the connection pool?
I'm currently looking into the possibility of moving our database to Aurora to take advantage of autoscaled DB capacity. However, I'm imagining there could be potential issues depending on how Prisma handles its connection pool. Specifically:
1) Does Prisma ever close or "refresh" idle connections once established? If it keeps them live forever, I can imagine this could prevent instance scale-in from happening, at least in a reasonable timespan, as eg a read replica would still have connections that its waiting to be terminated (or in the case of serverless v2, there may be more idle connections than can be supported with the allocated compute capacity can support)
2) What happens if the DB itself closes the idle connections, eg if I lowered wait_timeout? Would it just remove the connection from the pool and establish a new connection if needed?
If I'm reading the engines source correctly, it appears that there is both a default max lifetime (which may be configurable via an undocumented connection url query parameter?) as well as a periodic health check? Looking at the metrics for my current staging DB instance it doesn't seem to be releasing connections though, even though it gets barely any traffic
3 replies
DTDrizzle Team
•Created by Luxaritas on 4/11/2023 in #help
Typescript build fails with large number of columns
I have a table with ~460 columns, and on trying to run typescript on my app, I'm getting "error TS2589: Type instantiation is excessively deep and possibly infinite." It goes away once I reduce the number of columns in the Drizzle mysqlTable call to <= 357. Is there any way to address this?
195 replies