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

Reduce database connections to 1 during codegen #511

Closed
benluelo opened this issue Feb 10, 2022 · 1 comment · Fixed by #670
Closed

Reduce database connections to 1 during codegen #511

benluelo opened this issue Feb 10, 2022 · 1 comment · Fixed by #670
Labels
good first issue Good for newcomers

Comments

@benluelo
Copy link
Contributor

Summary

Currently, the default connection pool of SQLx is used which defaults to 10 connections. This could be reduced to 1 since codegen only performs readonly requests.

Motivation

This can cause issues with databases that limit the amount of connections (my personal use case is ElephantSQL free tier, which limits to 5 connections).

@billy1624
Copy link
Member

I guess we can add a option for sea-orm-cli to limit the maximum number of connection
https://docs.rs/sea-orm/0.6.0/sea_orm/struct.ConnectOptions.html#method.max_connections

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

Successfully merging a pull request may close this issue.

2 participants