Looking for advice - I've read the other two threads about this
in my server.xml file I have two places where maxThreads are defined in two places:
<Executor name="tomcatThreadPool" namePrefix="catalina-exec-" maxThreads="100" minSpareThreads="4"/>
AND
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" maxThreads="100" SSLEnabled="true" scheme="https" secure="true" connectionTimeout="600000" keystoreFile="/usr/local/tomcat/conf/keystore.p12" keystorePass="mypassword" clientAuth="false" sslProtocol="TLS" />
The error we are frequently running into with our server is : "Timeout: Pool empty. Unable to fetch a connection in 30 seconds, none available [size:100;busy:100;idle:0;lastwait:30000]" before a fatal shutdown of the system (the machine resets and starts up again - on an AWS ECS cluster)
When I increase the maxThreads value to 300 in the second instance listed here, we get the same error message - so I'm not sure if the connection size has increased at all. The system behaviour is different (machine doesnt restart) but then users cannot connect - it eventually needs manual restart.
How can I achieve more connections to the system or keep connectivity as high as possible?
In other posts about this topic some suggest decreasing maxThreads as well (assuming they complete quickly) could give better performance.
UPDATE:
in my application-properties file i had the following settings:
spring.datasource.url=jdbc:postgresql://db####
spring.datasource.username=#####
spring.datasource.password=######
spring.datasource.tomcat.max-wait=10000
spring.datasource.tomcat.max-active=60
spring.datasource.tomcat.test-on-borrow=true
spring.jpa.show-sql=false
#spring.jpa.hibernate.ddl-auto=create-drop
#spring.jpa.hibernate.ddl-auto=validate
spring.jpa.properties.hibernate.show_sql=false
spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.connection.provider_class=org.hibernate.c3p0.internal.C3P0ConnectionProvider
spring.jpa.properties.hibernate.c3p0.min_size=1
spring.jpa.properties.hibernate.c3p0.max_size=30
spring.jpa.properties.hibernate.c3p0.timeout=120
spring.jpa.properties.hibernate.c3p0.max_statements=20
maxActive
(by default 100).logAbandoned
andremoveAbandoned
properties of the pool to find them.