Cloud 运行 和 Cloud SQL 之间的连接数是否有限制?
Is there any limitation of number of connection between Cloud Run and Cloud SQL?
尽管云中的限制 SQL 足够高,但我们在应用程序中跳入“连接被拒绝”错误。
我在 Cloud-运行 错误日志中发现了这个错误:
"Exceeded maximum of 100 connections per instance for CLOUD_SQL_INSTANCE_NAME."
logName: "projects/PROJECT_ID/logs/run.googleapis.com%2Fvarlog%2Fsystem"
我们的云 SQL (MySQL 8) 正在 运行 使用此虚拟机:db-n1-standard-1 并且它有 max_connections 变量集 4030 (这是默认设置)所以我想限制不是来自数据库本身。
在文档中没有提到来自云 运行 端的云 SQL 连接的任何限制,只是数据库本身强制执行的一般限制。
我错过了什么吗?它是错误还是未记录的功能?
感谢您的回答!
云 SQL MySQL 个实例正在达到连接限制 4000 default。目前我发现的潜在解决方法包括:
所以我收到了 Cloud SQL 文档团队的回复:
I've learned that Cloud Run uses the same mechanism as App Engine to control connections to Cloud SQL. This mechanism has a max connections limit that is independent of the database setting.
This limit is 100 per instance. That means each instance of the application can have 100 connections, and as it scales the total number of connections per deployment can grow.
The user doesn't have any ability to change this limit.
尽管云中的限制 SQL 足够高,但我们在应用程序中跳入“连接被拒绝”错误。
我在 Cloud-运行 错误日志中发现了这个错误:
"Exceeded maximum of 100 connections per instance for CLOUD_SQL_INSTANCE_NAME."
logName: "projects/PROJECT_ID/logs/run.googleapis.com%2Fvarlog%2Fsystem"
我们的云 SQL (MySQL 8) 正在 运行 使用此虚拟机:db-n1-standard-1 并且它有 max_connections 变量集 4030 (这是默认设置)所以我想限制不是来自数据库本身。
在文档中没有提到来自云 运行 端的云 SQL 连接的任何限制,只是数据库本身强制执行的一般限制。
我错过了什么吗?它是错误还是未记录的功能? 感谢您的回答!
云 SQL MySQL 个实例正在达到连接限制 4000 default。目前我发现的潜在解决方法包括:
所以我收到了 Cloud SQL 文档团队的回复:
I've learned that Cloud Run uses the same mechanism as App Engine to control connections to Cloud SQL. This mechanism has a max connections limit that is independent of the database setting.
This limit is 100 per instance. That means each instance of the application can have 100 connections, and as it scales the total number of connections per deployment can grow.
The user doesn't have any ability to change this limit.