title: Spring Boot 1.5.3 Creating more connection than specified in application.properties
body: <p>I am working on a project where i have dual datasource configured. On testing i have limit the no of max-active connections to five but when i checked on database, i found that application create around 25+ connections.</p>
  
  <p><strong>Code Sample</strong></p>
  
  <pre><code># Number of ms to wait before throwing an exception if no connection is available.
  spring.datasource.tomcat.max-wait=1000
  # Maximum number of active connections that can be allocated from this pool at the same time.
  spring.datasource.tomcat.max-active=1
  spring.datasource.tomcat.max-idle=1
  spring.datasource.tomcat.min-idle=1
  spring.datasource.tomcat.initial-size=1
  # Validate the connection before borrowing it from the pool.
  spring.datasource.tomcat.test-on-borrow=true
  spring.datasource.tomcat.test-while-idle = true
  spring.datasource.tomcat.validation-query = true
  spring.datasource.tomcat.time-between-eviction-runs-millis = 360000
  
  
  spring.rdatasource.tomcat.max-wait=1000
  # Maximum number of active connections that can be allocated from this pool at the same time.
  spring.rdatasource.tomcat.max-active=1
  spring.rdatasource.tomcat.max-idle=1
  spring.rdatasource.tomcat.min-idle=1
  spring.rdatasource.tomcat.initial-size=1
  # Validate the connection before borrowing it from the pool.
  spring.rdatasource.tomcat.test-on-borrow=true
  spring.rdatasource.tomcat.test-while-idle= true
  spring.rdatasource.tomcat.validation-query = true
  spring.rdatasource.tomcat.time-between-eviction-runs-millis = 360000
  </code></pre>
  
  <p>above connection is working fine, but exceeding no of connection to database. User which i am using is limited to 10 connection. </p>
  
  <p>when i hit request to application than i am getting 
  <strong>query wait timeout error with unable to create initial pool size.</strong></p>
  
  <p><strong>I am using tomcat connection pooling</strong></p>
  
  <p>Please provide me the solution so application will run with 10 connections limit which is set at database.</p>