postgresql - 定义 AWS RDS Postgres session 限制

标签 postgresql amazon-web-services amazon-rds

为什么 RDS Postgres 显示的 session 限制约为 2?请参阅下图。仅仅是因为实例是 t3.medium 还是因为必须在 RDS 中设置一些参数?我搜索后找不到计算最大 session 数的参数?在 AWS 常见问题解答和 RDS 文档中也找不到任何相关信息。

enter image description here

enter image description here

期待您的帮助。

最佳答案

如果您正在考虑增加 RDS 实例的连接数。

AWS RDS max_connections 限制变量基于实例类型,因此您可以升级 RDS 或创建更多副本。

但是,您可以通过更新默认参数策略来更改 max_connections 值。

  • 前往 RDS
  • 参数组(如果没有,请创建一个新参数组)
  • 搜索 max_connections
  • 更改值(根据您的需要)
  • 进入RDS实例修改参数组(选择实例对应的参数组)
  • 重新启动实例。

这将覆盖当前的 max_connections 值。但是,当您实际开始连接的客户端数量开始增加时,在某个点之后,服务器将无法为每个连接分配足够的内存,这将导致连接下降。

说到 session 指标,它已被添加来衡量 RDS 实例的性能指标。

Why does Performance Insights measure database load in sessions?

Sessions, in this case, is shorthand for “average active sessions,” sometimes abbreviated “AAS.” An active session is a database connection that has submitted a request to the database but has not yet received the response. Measuring the average number of active concurrent sessions over time provides a clear picture of the load on the database.

请仔细阅读亚马逊发布的关于性能指标的文章:https://aws.amazon.com/blogs/database/analyzing-amazon-rds-database-workload-with-performance-insights/

它包含该指标的含义以及如何提高实例性能的完整信息。

希望这能帮助您理解!

关于postgresql - 定义 AWS RDS Postgres session 限制,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57220935/

相关文章:

sql - rails : query the existence of a join table's child

amazon-web-services - 将自定义脚本作为 Sagemaker Pipelines 的一部分运行

amazon-web-services - 将 Kubernetes 集群日志发送到 AWS Elasticsearch

amazon-web-services - 添加回声/日期时,s3cmd 不作为 cron 任务工作

sql - AWS RDS Postgres : No space left on Device

postgresql - 在 Postgres 中创建指向同一数据库的 db_link

postgresql - 如何在 Amazon ec2 上升级 psql?

postgresql - DBeaver PostgreSQL 数据库 - 此驱动程序不支持 SCRAM 身份验证

arrays - 如何在 pgSQL 中使用数组循环

postgresql - 不同大小的 postgres 数据库。将数据库从 server1 移动到 server2