1

Postgresql has a default of 100 regarding max_connections. Tomcat pooling has a default of 100 regarding maxActive and maxIdle.

How about configuring data sources in context.xml for Apps in Tomcat?

Given: 3 apps (war) containing 3 datasources in their context.xml Do I have to set maxActive and maxIdle to 33 for the three datasources to meet PostgreSQL's default of max_connections = 100?

I guess yes, because in pg_stat_activity I've seen that "maxIdle" in Tomcat leads to establish "maxIdle" connections in PostgreSQL.

Note: Using Tomcat 8.5.x and PostgreSQL 9.6.x

  • Did you set connection pooling? – Mladen Uzelac Jun 9 '18 at 18:11
  • Yes, I've written "Tomcat pooling". – Gunnar Jun 11 '18 at 7:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.