Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep alive connect to database #12

Open
hieuht-htv opened this issue Mar 18, 2024 · 0 comments
Open

Keep alive connect to database #12

hieuht-htv opened this issue Mar 18, 2024 · 0 comments

Comments

@hieuht-htv
Copy link

https://github.com/libsql/hrana-client-ts/blob/main/src/http/stream.ts#L363

I am using the turso.tech database (sqlite3) with NestJS TypeORM.

I've created DI for Repository to make it easier to use, specifically for master and slave (readonly) connections.
I understand that turso only maintains the connection to the database for 10 seconds, which causes issues with my DI usage. Every 10 seconds, the connection will be closed. I hope the development team of hrana-client-ts will take notice of this issue. I have a small suggestion, which is to add an option to enable/disable configuration for using #baton to close the connection.

Thank you!

my code:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant