Reputation: 31
need a help, i have a java application which is running on jboss -6. recently we got a requirement to keep our min-pool-size and max-pool-size same, along with prefill value should be "true'.
<pool>
<min-pool-size>100</min-pool-size>
<max-pool-size>100</max-pool-size>
<prefill>true</prefill>
</pool>
By default our standalone-full.xml has following datasource:
<datasource jta="false" jndi-name="java:jboss/<datasourcename>" pool-name="<datasourcename>" enabled="true" use-java-context="true" statistics-enabled="true">
<connection-url>jdbc:mysql://<dbhostip>:<port>/<dbdetailsForconnection></connection-url>
<driver>mysql</driver>
<pool>
<max-pool-size>100</min-pool-size>
<prefill>true</prefill>
</pool>
we have requirement to set pool size like below:
<pool>
<min-pool-size>100</min-pool-size>
<max-pool-size>100</max-pool-size>
<prefill>true</prefill>
</pool>
but every time when we make changes , our war files failed to get deployed. We are getting following error:
IJ000610: Unable to fill pool: javax.resource.ResourceException: Could not create connection When we define our connection pool setting like below: Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Too many connections
Approaches I tried: *remove datasource from jboss-cli and add datasource again *directly edit standalone-full.xml *after every change :reload it. *do the deployment and then edit xml ,reload afterward *before deployment ,edit, reload
Solution: I have two solution to make it work :
<pool>
<min-pool-size>1</min-pool-size>
<max-pool-size>100</max-pool-size>
<prefill>true</prefill>
</pool>
<pool>
<min-pool-size>100</min-pool-size>
<max-pool-size>100</max-pool-size>
</pool>
but these solution are against the requirement.
Upvotes: 2
Views: 2900
Reputation: 31
After lots of head scratching, finally i have resolved this issue by increasing max connection limit in my db serveri.e mysql . after set max_connection limit. it start working
Upvotes: 0