You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I am switching my project over to Remix and an issue with local development is that it constantly destroys module state between requests. When using Mikro, this is problematic as the connection pool keeps getting recreated and eventually the server gets exhausted. While the Mikro instance could be a singleton and re-used this means any changes to anything related to the database would require a full server restart vs hot reload.
Describe the solution you'd like
Here is how I am currently hacking it:
The concern obviously is how to expose this without leaking the usage of knex to end-user. From what I can tell, the connection classes are coupled with metadata (which can change between hot reloads). Knex itself doesn't really have a way to support passing in existing pg connections/pools.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I am switching my project over to Remix and an issue with local development is that it constantly destroys module state between requests. When using Mikro, this is problematic as the connection pool keeps getting recreated and eventually the server gets exhausted. While the Mikro instance could be a singleton and re-used this means any changes to anything related to the database would require a full server restart vs hot reload.
Describe the solution you'd like
Here is how I am currently hacking it:
The concern obviously is how to expose this without leaking the usage of knex to end-user. From what I can tell, the connection classes are coupled with metadata (which can change between hot reloads). Knex itself doesn't really have a way to support passing in existing pg connections/pools.
The text was updated successfully, but these errors were encountered: