分享

PgPool阻塞问题

 jas0n_liu 2019-05-21

tomcat启动过程中总是会卡住,com.alibaba.druid.pool.DruidDataSource   : {dataSource-1} inited,怀疑是pgpool的问题,查看相关资料是pgpool无法连接问题,重启pgpool就可以解决。

num_init_children:pgPool允许的最大并发数,默认32。
max_pool:连接池的数量,默认4。
pgpool需要的数据库连接数=num_init_children*max_pool;
后检查Postgresql数据库的postgresql.conf文件的max_connections=100,superuser_reserved_connections=3。
pgpool的连接参数应当满足如下公式:

num_init_children*max_pool<max_connections-superuser_reserved_connections

当需要pgpool支持更多的并发时,需要更改num_init_children参数,同时要检查下num_init_children*max_pool是否超过了max_connections-superuser_reserved_connections,如果超过了,可将max_connections改的更大。

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多