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
{{ message }}
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.
This is more of a feature request rather than a bug report, so the PR template below is only tersely completed. If more data is required I can provide as needed, but I think this request is fairly self-explanatory: could we please get some control over the connection pool size for terraform-mysql?
If some control already exists and I just haven't looked hard enough, apologies, please guide me 😁
Since Terraform attempts to run with a parallelism of 10 by default, this can cause issues if you have several providers pointing to the same, small MySQL server, contributing to the overall connection count on the server. In our case, we see connections spike from 60 to 90 at which point our configured limit is hit and Terraform begins to fail (as well as other apps actively using the server).
We'd prefer to not raise this configured limit, nor would we want to limit Terraform's parallelism for everything else, instead we'd prefer to limit how many connections Terraform will try to make per MySQL provider.
As I understand it, the default connection pool size for databases in Go is 0 (unlimited). An option on the provider block would be welcome.
Terraform Version
0.11.13
Affected Resource(s)
Please list the resources as a list, for example:
Any mysql_* resource
Terraform Configuration Files
None. This is going to depend greatly on your server setup so I haven't produced a minimal TF config set for this. If needed I will try to produce one but it would also require a mysql server configured with a low connection limit.
Debug Output
None. Though, can investigate if required.
Panic Output
None.
Expected Behavior
The MySQL provider respected a configurable, per-provider connection pool size.
Actual Behavior
Apply fails for some resources with "too many connections" error from server. Other apps using the same server/s also begin emitting the same errors. Monitoring shows upwards of 30+ connections simultaneous connections being started from Terraform.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
Terraform running on EC2, against RDS Aurora/MySQL, instance size: db.t2.medium (default max 90 connections)
References
None, though, #71 is requesting a similar type of additional control over connection management.
The text was updated successfully, but these errors were encountered:
+1
As a temporary work-around db.SetMaxIdleConns(N) might be added to connectToMySQL function, so idle connections will be dropped, after their number reach the threshold N
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is more of a feature request rather than a bug report, so the PR template below is only tersely completed. If more data is required I can provide as needed, but I think this request is fairly self-explanatory: could we please get some control over the connection pool size for terraform-mysql?
If some control already exists and I just haven't looked hard enough, apologies, please guide me 😁
Since Terraform attempts to run with a parallelism of 10 by default, this can cause issues if you have several providers pointing to the same, small MySQL server, contributing to the overall connection count on the server. In our case, we see connections spike from 60 to 90 at which point our configured limit is hit and Terraform begins to fail (as well as other apps actively using the server).
We'd prefer to not raise this configured limit, nor would we want to limit Terraform's parallelism for everything else, instead we'd prefer to limit how many connections Terraform will try to make per MySQL provider.
As I understand it, the default connection pool size for databases in Go is 0 (unlimited). An option on the
provider
block would be welcome.Terraform Version
0.11.13
Affected Resource(s)
Please list the resources as a list, for example:
mysql_*
resourceTerraform Configuration Files
None. This is going to depend greatly on your server setup so I haven't produced a minimal TF config set for this. If needed I will try to produce one but it would also require a mysql server configured with a low connection limit.
Debug Output
None. Though, can investigate if required.
Panic Output
None.
Expected Behavior
The MySQL provider respected a configurable, per-provider connection pool size.
Actual Behavior
Apply fails for some resources with "too many connections" error from server. Other apps using the same server/s also begin emitting the same errors. Monitoring shows upwards of 30+ connections simultaneous connections being started from Terraform.
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
Terraform running on EC2, against RDS Aurora/MySQL, instance size: db.t2.medium (default max 90 connections)
References
None, though, #71 is requesting a similar type of additional control over connection management.
The text was updated successfully, but these errors were encountered: