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改的更大。
联系客服