jdbc connction pool issues

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

jdbc connction pool issues

Beard, Shawn M.

We have this jdbc connection pool set up:

 

<Resource name="jdbc/DataSource" auth="Container" type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://hostname:1433;selectMethod=direct;databaseName=databasename;sendStringParametersAsUnicode=false"
username="XXX" password="XXXXXX" maxIdle="20" minIdle="10" maxActive="50"
maxWait="30000" testWhileIdle="true" testOnBorrow="true" validationQuery="SELECT 1"/>

 

However we are getting this error:

Resource Pool Limit Reached

Time     12/15/20 11:48:00 AM

Summary         

JDBC Connection Pool Catalina:class=javax.sql.DataSource,context=/XX,host=XXXXXXXXX,name="jdbc/DataSource",type=DataSource has reached 80% limit. Current pool size [8, Max pool size [8]

 

Shouldn’t the max connections of the connection pool be 50 since maxActive is 50?

 

 

 

Shawn Beard • Sr. Systems Engineer
Middleware Engineering

 


 3840 109th Street Urbandale, IA 50322
 Phone: +1-515-564-2528
 Email: [hidden email]
 Website: berkleytechnologyservices.com

 

Technology Leadership Unleashing Business Potential

 

 


Shawn   Beard
Sr. Systems Engineer  | 
BTS
Middleware Engineering  |  <a href="tel:&#43;1-515-564-2528" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#000001;">+1-515-564-2528  |  [hidden email]

 
CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.

Reply | Threaded
Open this post in threaded view
|

RE: jdbc connction pool issues

Johnson, Jim
Hi Shawn,

I think you’re missing initialSize

initialSize
(int)The initial number of connections that are created when the pool is started. Default value is 10

maxActive
(int) The maximum number of active connections that can be allocated from this pool at the same time. The default value is 100

It would make sense that 8 connections would be 80% utilized.

I would try replacing maxActive with initialSize and seeing how that works for you.

Good luck!

- Jim

From: Beard, Shawn <[hidden email]>
Sent: Tuesday, December 15, 2020 2:12 PM
To: Tomcat Users List <[hidden email]>
Subject: jdbc connction pool issues

CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

We have this jdbc connection pool set up:

<Resource name="jdbc/DataSource" auth="Container" type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://hostname:1433;selectMethod=direct;databaseName=databasename;sendStringParametersAsUnicode=false"
username="XXX" password="XXXXXX" maxIdle="20" minIdle="10" maxActive="50"
maxWait="30000" testWhileIdle="true" testOnBorrow="true" validationQuery="SELECT 1"/>

However we are getting this error:
Resource Pool Limit Reached
Time     12/15/20 11:48:00 AM
Summary
JDBC Connection Pool Catalina:class=javax.sql.DataSource,context=/XX,host=XXXXXXXXX,name="jdbc/DataSource",type=DataSource has reached 80% limit. Current pool size [8, Max pool size [8]

Shouldn’t the max connections of the connection pool be 50 since maxActive is 50?



Shawn Beard • Sr. Systems Engineer
Middleware Engineering

[cid:image003.png@01D6D2E3.D5F1EFA0]

 3840 109th Street Urbandale, IA 50322
 Phone: +1-515-564-2528
 Email: [hidden email]<mailto:[hidden email]>
 Website: berkleytechnologyservices.com<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.berkleytechnologyservices.com%2F&data=04%7C01%7CJ1Johnson%40unum.com%7C64e6e4965acb42aebfe708d8a12d798c%7Cd5952c785d4e41caaff07174c1f75393%7C0%7C0%7C637436563975240326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=3nTT6swXEeC2zC%2BUb7Q7nvgxM214SGf7HJaI%2F4%2BYupA%3D&reserved=0>

Technology Leadership Unleashing Business Potential


Shawn​

Beard
Sr. Systems Engineer
 |
BTS
Middleware Engineering
 |
+1-515-564-2528<tel:+1-515-564-2528>
 |
[hidden email]<mailto:[hidden email]>

CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
Reply | Threaded
Open this post in threaded view
|

RE: jdbc connction pool issues [EXTERNAL]

Beard, Shawn M.
If default is 10, they why would we be getting an error about 8 being max?



Shawn​          Beard

Sr. Systems Engineer     |
        BTS

Middleware Engineering   |      +1-515-564-2528<tel:+1-515-564-2528>     |      [hidden email]<mailto:[hidden email]>









-----Original Message-----
From: Johnson, Jim <[hidden email]>
Sent: Tuesday, December 15, 2020 1:35 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

** CAUTION: External message


Hi Shawn,

I think you’re missing initialSize

initialSize
(int)The initial number of connections that are created when the pool is started. Default value is 10

maxActive
(int) The maximum number of active connections that can be allocated from this pool at the same time. The default value is 100

It would make sense that 8 connections would be 80% utilized.

I would try replacing maxActive with initialSize and seeing how that works for you.

Good luck!

- Jim

From: Beard, Shawn <[hidden email]>
Sent: Tuesday, December 15, 2020 2:12 PM
To: Tomcat Users List <[hidden email]>
Subject: jdbc connction pool issues

CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

We have this jdbc connection pool set up:

<Resource name="jdbc/DataSource" auth="Container" type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://hostname:1433;selectMethod=direct;databaseName=databasename;sendStringParametersAsUnicode=false"
username="XXX" password="XXXXXX" maxIdle="20" minIdle="10" maxActive="50"
maxWait="30000" testWhileIdle="true" testOnBorrow="true" validationQuery="SELECT 1"/>

However we are getting this error:
Resource Pool Limit Reached
Time 12/15/20 11:48:00 AM
Summary
JDBC Connection Pool Catalina:class=javax.sql.DataSource,context=/XX,host=XXXXXXXXX,name="jdbc/DataSource",type=DataSource has reached 80% limit. Current pool size [8, Max pool size [8]

Shouldn’t the max connections of the connection pool be 50 since maxActive is 50?



Shawn Beard • Sr. Systems Engineer
Middleware Engineering

[cid:image003.png@01D6D2E3.D5F1EFA0]

3840 109th Street Urbandale, IA 50322
Phone: +1-515-564-2528
Email: [hidden email]<mailto:[hidden email]>
Website: berkleytechnologyservices.com<https://urldefense.com/v3/__https://nam05.safelinks.protection.outlook.com/?url=https*3A*2F*2Fwww.berkleytechnologyservices.com*2F&data=04*7C01*7CJ1Johnson*40unum.com*7C64e6e4965acb42aebfe708d8a12d798c*7Cd5952c785d4e41caaff07174c1f75393*7C0*7C0*7C637436563975240326*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000&sdata=3nTT6swXEeC2zC*2BUb7Q7nvgxM214SGf7HJaI*2F4*2BYupA*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSU!!Li8W9_Um1Taa!qrMl5L--I8QMohhvL9LXmHKdJz0jf2lM2XTvoH8FwyisGVhxNJdYs74vjiQ2KJgp$ >

Technology Leadership Unleashing Business Potential


Shawn​

Beard
Sr. Systems Engineer
|
BTS
Middleware Engineering
|
+1-515-564-2528<tel:+1-515-564-2528>
|
[hidden email]<mailto:[hidden email]>

CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
Reply | Threaded
Open this post in threaded view
|

RE: jdbc connction pool issues [EXTERNAL]

Beard, Shawn M.
In reply to this post by Johnson, Jim
But wouldn’t maxActive mean the connection pool has a max of 50 conenctions? On other tomcat servers I have, maxActive is set to 50 and I verified im jmx that there are 50 max connections on the connection pool.

Here though I checked jmx, sure enough, its max connections is 8.



Shawn​          Beard

Sr. Systems Engineer     |
        BTS

Middleware Engineering   |      +1-515-564-2528<tel:+1-515-564-2528>     |      [hidden email]<mailto:[hidden email]>









-----Original Message-----
From: Johnson, Jim <[hidden email]>
Sent: Tuesday, December 15, 2020 1:35 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

** CAUTION: External message


Hi Shawn,

I think you’re missing initialSize

initialSize
(int)The initial number of connections that are created when the pool is started. Default value is 10

maxActive
(int) The maximum number of active connections that can be allocated from this pool at the same time. The default value is 100

It would make sense that 8 connections would be 80% utilized.

I would try replacing maxActive with initialSize and seeing how that works for you.

Good luck!

- Jim

From: Beard, Shawn <[hidden email]>
Sent: Tuesday, December 15, 2020 2:12 PM
To: Tomcat Users List <[hidden email]>
Subject: jdbc connction pool issues

CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

We have this jdbc connection pool set up:

<Resource name="jdbc/DataSource" auth="Container" type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://hostname:1433;selectMethod=direct;databaseName=databasename;sendStringParametersAsUnicode=false"
username="XXX" password="XXXXXX" maxIdle="20" minIdle="10" maxActive="50"
maxWait="30000" testWhileIdle="true" testOnBorrow="true" validationQuery="SELECT 1"/>

However we are getting this error:
Resource Pool Limit Reached
Time 12/15/20 11:48:00 AM
Summary
JDBC Connection Pool Catalina:class=javax.sql.DataSource,context=/XX,host=XXXXXXXXX,name="jdbc/DataSource",type=DataSource has reached 80% limit. Current pool size [8, Max pool size [8]

Shouldn’t the max connections of the connection pool be 50 since maxActive is 50?



Shawn Beard • Sr. Systems Engineer
Middleware Engineering

[cid:image003.png@01D6D2E3.D5F1EFA0]

3840 109th Street Urbandale, IA 50322
Phone: +1-515-564-2528
Email: [hidden email]<mailto:[hidden email]>
Website: berkleytechnologyservices.com<https://urldefense.com/v3/__https://nam05.safelinks.protection.outlook.com/?url=https*3A*2F*2Fwww.berkleytechnologyservices.com*2F&data=04*7C01*7CJ1Johnson*40unum.com*7C64e6e4965acb42aebfe708d8a12d798c*7Cd5952c785d4e41caaff07174c1f75393*7C0*7C0*7C637436563975240326*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000&sdata=3nTT6swXEeC2zC*2BUb7Q7nvgxM214SGf7HJaI*2F4*2BYupA*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSU!!Li8W9_Um1Taa!qrMl5L--I8QMohhvL9LXmHKdJz0jf2lM2XTvoH8FwyisGVhxNJdYs74vjiQ2KJgp$ >

Technology Leadership Unleashing Business Potential


Shawn​

Beard
Sr. Systems Engineer
|
BTS
Middleware Engineering
|
+1-515-564-2528<tel:+1-515-564-2528>
|
[hidden email]<mailto:[hidden email]>

CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
Reply | Threaded
Open this post in threaded view
|

RE: jdbc connction pool issues [EXTERNAL]

Johnson, Jim
In reply to this post by Beard, Shawn M.
Hi Shawn,

I can't speak to that monitoring tool or why it reports that way. I do see what you're saying though - I would expect the error message to be something like:

>>name="jdbc/DataSource",type=DataSource has reached 80% limit.
>>Current pool size [8, Max pool size [10]

However, it could be that the number of maxActive connections at the time was 8 and they simply labeled it incorrectly.

From my perspective it seemed that if you're getting an alert at 80% pool size and the current pool size is 8 then you're probably looking for a default setting of 10 somewhere that isn't being set and initialSize seemed like a good candidate for that setting.

Perhaps you might check your monitoring tool thresholds - I would have to think that 80% is setting off bells and whistles so you have time to act before your JVM blows up.

Cheers!

- Jim

-----Original Message-----
From: Beard, Shawn <[hidden email]>
Sent: Tuesday, December 15, 2020 2:42 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

If default is 10, they why would we be getting an error about 8 being max?



Shawn​          Beard

Sr. Systems Engineer     |
        BTS

Middleware Engineering   |      +1-515-564-2528<tel:+1-515-564-2528>     |      [hidden email]<mailto:[hidden email]>









-----Original Message-----
From: Johnson, Jim <[hidden email]>
Sent: Tuesday, December 15, 2020 1:35 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

** CAUTION: External message


Hi Shawn,

I think you’re missing initialSize

initialSize
(int)The initial number of connections that are created when the pool is started. Default value is 10

maxActive
(int) The maximum number of active connections that can be allocated from this pool at the same time. The default value is 100

It would make sense that 8 connections would be 80% utilized.

I would try replacing maxActive with initialSize and seeing how that works for you.

Good luck!

- Jim

From: Beard, Shawn <[hidden email]>
Sent: Tuesday, December 15, 2020 2:12 PM
To: Tomcat Users List <[hidden email]>
Subject: jdbc connction pool issues

CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

We have this jdbc connection pool set up:

<Resource name="jdbc/DataSource" auth="Container" type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://hostname:1433;selectMethod=direct;databaseName=databasename;sendStringParametersAsUnicode=false"
username="XXX" password="XXXXXX" maxIdle="20" minIdle="10" maxActive="50"
maxWait="30000" testWhileIdle="true" testOnBorrow="true" validationQuery="SELECT 1"/>

However we are getting this error:
Resource Pool Limit Reached
Time 12/15/20 11:48:00 AM
Summary
JDBC Connection Pool Catalina:class=javax.sql.DataSource,context=/XX,host=XXXXXXXXX,name="jdbc/DataSource",type=DataSource has reached 80% limit. Current pool size [8, Max pool size [8]

Shouldn’t the max connections of the connection pool be 50 since maxActive is 50?



Shawn Beard • Sr. Systems Engineer
Middleware Engineering

[cid:image003.png@01D6D2E3.D5F1EFA0]

3840 109th Street Urbandale, IA 50322
Phone: +1-515-564-2528
Email: [hidden email]<mailto:[hidden email]>
Website: berkleytechnologyservices.com<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2F%2Fnam05.safelinks.protection.outlook.com%2F%3Furl%3Dhttps*3A*2F*2Fwww.berkleytechnologyservices.com*2F%26data%3D04*7C01*7CJ1Johnson*40unum.com*7C64e6e4965acb42aebfe708d8a12d798c*7Cd5952c785d4e41caaff07174c1f75393*7C0*7C0*7C637436563975240326*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000%26sdata%3D3nTT6swXEeC2zC*2BUb7Q7nvgxM214SGf7HJaI*2F4*2BYupA*3D%26reserved%3D0__%3BJSUlJSUlJSUlJSUlJSUlJSUlJSU!!Li8W9_Um1Taa!qrMl5L--I8QMohhvL9LXmHKdJz0jf2lM2XTvoH8FwyisGVhxNJdYs74vjiQ2KJgp%24&amp;data=04%7C01%7CJ1Johnson%40unum.com%7C45da4026f80749aa4a4308d8a131bb92%7Cd5952c785d4e41caaff07174c1f75393%7C0%7C0%7C637436582286624695%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=SsGXcy8tkFZxQlLMGWv1%2BZGKqnkiDRx3UvGWqo72a7o%3D&amp;reserved=0 >

Technology Leadership Unleashing Business Potential


Shawn​

Beard
Sr. Systems Engineer
|
BTS
Middleware Engineering
|
+1-515-564-2528<tel:+1-515-564-2528>
|
[hidden email]<mailto:[hidden email]>

CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: jdbc connction pool issues [EXTERNAL]

Johnson, Jim
In reply to this post by Beard, Shawn M.
Hi Shawn,

No, I don't think that maxActive means that it's defining the maximum number of connections for the pool, I think it's strictly referring to the "[ .. ] maximum number of *active connections* that can be allocated from this pool at the same time. [ .. ]"  (emphasis mine on active connections)

Here is the doc that I've been referring to - sorry for not linking it earlier:
https://tomcat.apache.org/tomcat-9.0-doc/jdbc-pool.html

On those other Tomcat servers is there a initialSize defined?

 Jim

-----Original Message-----
From: Beard, Shawn <[hidden email]>
Sent: Tuesday, December 15, 2020 2:49 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

But wouldn’t maxActive mean the connection pool has a max of 50 conenctions? On other tomcat servers I have, maxActive is set to 50 and I verified im jmx that there are 50 max connections on the connection pool.

Here though I checked jmx, sure enough, its max connections is 8.



Shawn​          Beard

Sr. Systems Engineer     |
        BTS

Middleware Engineering   |      +1-515-564-2528<tel:+1-515-564-2528>     |      [hidden email]<mailto:[hidden email]>









-----Original Message-----
From: Johnson, Jim <[hidden email]>
Sent: Tuesday, December 15, 2020 1:35 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

** CAUTION: External message


Hi Shawn,

I think you’re missing initialSize

initialSize
(int)The initial number of connections that are created when the pool is started. Default value is 10

maxActive
(int) The maximum number of active connections that can be allocated from this pool at the same time. The default value is 100

It would make sense that 8 connections would be 80% utilized.

I would try replacing maxActive with initialSize and seeing how that works for you.

Good luck!

- Jim

From: Beard, Shawn <[hidden email]>
Sent: Tuesday, December 15, 2020 2:12 PM
To: Tomcat Users List <[hidden email]>
Subject: jdbc connction pool issues

CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

We have this jdbc connection pool set up:

<Resource name="jdbc/DataSource" auth="Container" type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://hostname:1433;selectMethod=direct;databaseName=databasename;sendStringParametersAsUnicode=false"
username="XXX" password="XXXXXX" maxIdle="20" minIdle="10" maxActive="50"
maxWait="30000" testWhileIdle="true" testOnBorrow="true" validationQuery="SELECT 1"/>

However we are getting this error:
Resource Pool Limit Reached
Time 12/15/20 11:48:00 AM
Summary
JDBC Connection Pool Catalina:class=javax.sql.DataSource,context=/XX,host=XXXXXXXXX,name="jdbc/DataSource",type=DataSource has reached 80% limit. Current pool size [8, Max pool size [8]

Shouldn’t the max connections of the connection pool be 50 since maxActive is 50?



Shawn Beard • Sr. Systems Engineer
Middleware Engineering

[cid:image003.png@01D6D2E3.D5F1EFA0]

3840 109th Street Urbandale, IA 50322
Phone: +1-515-564-2528
Email: [hidden email]<mailto:[hidden email]>
Website: berkleytechnologyservices.com<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2F%2Fnam05.safelinks.protection.outlook.com%2F%3Furl%3Dhttps*3A*2F*2Fwww.berkleytechnologyservices.com*2F%26data%3D04*7C01*7CJ1Johnson*40unum.com*7C64e6e4965acb42aebfe708d8a12d798c*7Cd5952c785d4e41caaff07174c1f75393*7C0*7C0*7C637436563975240326*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000%26sdata%3D3nTT6swXEeC2zC*2BUb7Q7nvgxM214SGf7HJaI*2F4*2BYupA*3D%26reserved%3D0__%3BJSUlJSUlJSUlJSUlJSUlJSUlJSU!!Li8W9_Um1Taa!qrMl5L--I8QMohhvL9LXmHKdJz0jf2lM2XTvoH8FwyisGVhxNJdYs74vjiQ2KJgp%24&amp;data=04%7C01%7CJ1Johnson%40unum.com%7C016565a918474642884608d8a1328579%7Cd5952c785d4e41caaff07174c1f75393%7C0%7C0%7C637436585655273329%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&amp;sdata=tBYkHrqnGHyaJPmtqrHIB5LPJLsZfdU4YdsK2JFVwAo%3D&amp;reserved=0 >

Technology Leadership Unleashing Business Potential


Shawn​

Beard
Sr. Systems Engineer
|
BTS
Middleware Engineering
|
+1-515-564-2528<tel:+1-515-564-2528>
|
[hidden email]<mailto:[hidden email]>

CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: jdbc connction pool issues [EXTERNAL]

Beard, Shawn M.
No intitialSize is not defined.

Im getting the data to verify from JMX, however we also have an APM called appdynamics loaded. Both verified the 8 max connections.

Other tomcat servers with exact same jdbc connection pool config(only difference is servername, databasename, user and pass) show 50 max connections, which is what maxActive is set to.



Shawn​          Beard

Sr. Systems Engineer     |
        BTS

Middleware Engineering   |      +1-515-564-2528<tel:+1-515-564-2528>     |      [hidden email]<mailto:[hidden email]>









-----Original Message-----
From: Johnson, Jim <[hidden email]>
Sent: Tuesday, December 15, 2020 2:22 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

** CAUTION: External message


Hi Shawn,

No, I don't think that maxActive means that it's defining the maximum number of connections for the pool, I think it's strictly referring to the "[ .. ] maximum number of *active connections* that can be allocated from this pool at the same time. [ .. ]" (emphasis mine on active connections)

Here is the doc that I've been referring to - sorry for not linking it earlier:
https://urldefense.com/v3/__https://tomcat.apache.org/tomcat-9.0-doc/jdbc-pool.html__;!!Li8W9_Um1Taa!vJGrxr7yc86joO5r6QoNstpipfempGFqrYRe3_NyAIGNs-LenmBWhtjn1fRiAOex$

On those other Tomcat servers is there a initialSize defined?

Jim

-----Original Message-----
From: Beard, Shawn <[hidden email]>
Sent: Tuesday, December 15, 2020 2:49 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

But wouldn’t maxActive mean the connection pool has a max of 50 conenctions? On other tomcat servers I have, maxActive is set to 50 and I verified im jmx that there are 50 max connections on the connection pool.

Here though I checked jmx, sure enough, its max connections is 8.



Shawn​ Beard

Sr. Systems Engineer |
BTS

Middleware Engineering | +1-515-564-2528<tel:+1-515-564-2528> | [hidden email]<mailto:[hidden email]>









-----Original Message-----
From: Johnson, Jim <[hidden email]>
Sent: Tuesday, December 15, 2020 1:35 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

** CAUTION: External message


Hi Shawn,

I think you’re missing initialSize

initialSize
(int)The initial number of connections that are created when the pool is started. Default value is 10

maxActive
(int) The maximum number of active connections that can be allocated from this pool at the same time. The default value is 100

It would make sense that 8 connections would be 80% utilized.

I would try replacing maxActive with initialSize and seeing how that works for you.

Good luck!

- Jim

From: Beard, Shawn <[hidden email]>
Sent: Tuesday, December 15, 2020 2:12 PM
To: Tomcat Users List <[hidden email]>
Subject: jdbc connction pool issues

CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

We have this jdbc connection pool set up:

<Resource name="jdbc/DataSource" auth="Container" type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://hostname:1433;selectMethod=direct;databaseName=databasename;sendStringParametersAsUnicode=false"
username="XXX" password="XXXXXX" maxIdle="20" minIdle="10" maxActive="50"
maxWait="30000" testWhileIdle="true" testOnBorrow="true" validationQuery="SELECT 1"/>

However we are getting this error:
Resource Pool Limit Reached
Time 12/15/20 11:48:00 AM
Summary
JDBC Connection Pool Catalina:class=javax.sql.DataSource,context=/XX,host=XXXXXXXXX,name="jdbc/DataSource",type=DataSource has reached 80% limit. Current pool size [8, Max pool size [8]

Shouldn’t the max connections of the connection pool be 50 since maxActive is 50?



Shawn Beard • Sr. Systems Engineer
Middleware Engineering

[cid:image003.png@01D6D2E3.D5F1EFA0]

3840 109th Street Urbandale, IA 50322
Phone: +1-515-564-2528
Email: [hidden email]<mailto:[hidden email]>
Website: berkleytechnologyservices.com<https://urldefense.com/v3/__https://nam05.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.com*2Fv3*2F__https*3A*2F*2Fnam05.safelinks.protection.outlook.com*2F*3Furl*3Dhttps*3A*2F*2Fwww.berkleytechnologyservices.com*2F*26data*3D04*7C01*7CJ1Johnson*40unum.com*7C64e6e4965acb42aebfe708d8a12d798c*7Cd5952c785d4e41caaff07174c1f75393*7C0*7C0*7C637436563975240326*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*26sdata*3D3nTT6swXEeC2zC*2BUb7Q7nvgxM214SGf7HJaI*2F4*2BYupA*3D*26reserved*3D0__*3BJSUlJSUlJSUlJSUlJSUlJSUlJSU!!Li8W9_Um1Taa!qrMl5L--I8QMohhvL9LXmHKdJz0jf2lM2XTvoH8FwyisGVhxNJdYs74vjiQ2KJgp*24&amp;data=04*7C01*7CJ1Johnson*40unum.com*7C016565a918474642884608d8a1328579*7Cd5952c785d4e41caaff07174c1f75393*7C0*7C0*7C637436585655273329*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C2000&amp;sdata=tBYkHrqnGHyaJPmtqrHIB5LPJLsZfdU4YdsK2JFVwAo*3D&amp;reserved=0__;JSUlJSUlJSUlJSUqKioqJSUqKioqKioqKioqKiolJSoqKiolJSUlJSUlJSUlJSUlJSUlJQ!!Li8W9_Um1Taa!vJGrxr7yc86joO5r6QoNstpipfempGFqrYRe3_NyAIGNs-LenmBWhtjn1ZVqcYXS$ >

Technology Leadership Unleashing Business Potential


Shawn​

Beard
Sr. Systems Engineer
|
BTS
Middleware Engineering
|
+1-515-564-2528<tel:+1-515-564-2528>
|
[hidden email]<mailto:[hidden email]>

CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
Reply | Threaded
Open this post in threaded view
|

RE: jdbc connction pool issues [EXTERNAL]

Jalaj Asher
In reply to this post by Johnson, Jim
Hi Shawn,
Check the Catalina home and see if your tomcat set up Is pointed to the correct path.
You can check that from the registry as well to make sure the service is not pointed to another tomcat which might have these parameters setup.

The registry path is HKEY_LOCAL_MACHINE --> software-->wow6432node ---> apache software foundation.

Else you might want to check if the same is a problem with DBCP pool as well . As from the details shared looks like you are using jdbc pool.

Regards

Jalaj

-----Original Message-----
From: Johnson, Jim <[hidden email]>
Sent: Tuesday, December 15, 2020 3:22 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

Attention: This email was sent from someone outside of eClinicalWorks. Always use caution when opening attachments or clicking links from unknown senders or when receiving unexpected emails.

Hi Shawn,

No, I don't think that maxActive means that it's defining the maximum number of connections for the pool, I think it's strictly referring to the "[ .. ] maximum number of *active connections* that can be allocated from this pool at the same time. [ .. ]"  (emphasis mine on active connections)

Here is the doc that I've been referring to - sorry for not linking it earlier:
https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftomcat.apache.org%2Ftomcat-9.0-doc%2Fjdbc-pool.html&amp;data=04%7C01%7Cjalaj.asher%40eclinicalworks.com%7C3f5dd36a4b0d458695d908d8a1371f11%7C7ce747e48f6d4e0697efa9b76a063808%7C1%7C0%7C637436605411941490%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=bPYOMGVa0dYi0ASx%2BuQ5pTdlzpuOKird7pAVi%2FjHQVs%3D&amp;reserved=0

On those other Tomcat servers is there a initialSize defined?

 Jim

-----Original Message-----
From: Beard, Shawn <[hidden email]>
Sent: Tuesday, December 15, 2020 2:49 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

But wouldn’t maxActive mean the connection pool has a max of 50 conenctions? On other tomcat servers I have, maxActive is set to 50 and I verified im jmx that there are 50 max connections on the connection pool.

Here though I checked jmx, sure enough, its max connections is 8.



Shawn​          Beard

Sr. Systems Engineer     |
        BTS

Middleware Engineering   |      +1-515-564-2528<tel:+1-515-564-2528>     |      [hidden email]<mailto:[hidden email]>









-----Original Message-----
From: Johnson, Jim <[hidden email]>
Sent: Tuesday, December 15, 2020 1:35 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

** CAUTION: External message


Hi Shawn,

I think you’re missing initialSize

initialSize
(int)The initial number of connections that are created when the pool is started. Default value is 10

maxActive
(int) The maximum number of active connections that can be allocated from this pool at the same time. The default value is 100

It would make sense that 8 connections would be 80% utilized.

I would try replacing maxActive with initialSize and seeing how that works for you.

Good luck!

- Jim

From: Beard, Shawn <[hidden email]>
Sent: Tuesday, December 15, 2020 2:12 PM
To: Tomcat Users List <[hidden email]>
Subject: jdbc connction pool issues

CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

We have this jdbc connection pool set up:

<Resource name="jdbc/DataSource" auth="Container" type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://hostname:1433;selectMethod=direct;databaseName=databasename;sendStringParametersAsUnicode=false"
username="XXX" password="XXXXXX" maxIdle="20" minIdle="10" maxActive="50"
maxWait="30000" testWhileIdle="true" testOnBorrow="true" validationQuery="SELECT 1"/>

However we are getting this error:
Resource Pool Limit Reached
Time 12/15/20 11:48:00 AM
Summary
JDBC Connection Pool Catalina:class=javax.sql.DataSource,context=/XX,host=XXXXXXXXX,name="jdbc/DataSource",type=DataSource has reached 80% limit. Current pool size [8, Max pool size [8]

Shouldn’t the max connections of the connection pool be 50 since maxActive is 50?



Shawn Beard • Sr. Systems Engineer
Middleware Engineering

[cid:image003.png@01D6D2E3.D5F1EFA0]

3840 109th Street Urbandale, IA 50322
Phone: +1-515-564-2528
Email: [hidden email]<mailto:[hidden email]>
Website: berkleytechnologyservices.com<https://nam05.safelinks.protection.outlook.com/?url=https%3A%2F%2Furldefense.com%2Fv3%2F__https%3A%2F%2Fnam05.safelinks.protection.outlook.com%2F%3Furl%3Dhttps*3A*2F*2Fwww.berkleytechnologyservices.com*2F%26data%3D04*7C01*7CJ1Johnson*40unum.com*7C64e6e4965acb42aebfe708d8a12d798c*7Cd5952c785d4e41caaff07174c1f75393*7C0*7C0*7C637436563975240326*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000%26sdata%3D3nTT6swXEeC2zC*2BUb7Q7nvgxM214SGf7HJaI*2F4*2BYupA*3D%26reserved%3D0__%3BJSUlJSUlJSUlJSUlJSUlJSUlJSU!!Li8W9_Um1Taa!qrMl5L--I8QMohhvL9LXmHKdJz0jf2lM2XTvoH8FwyisGVhxNJdYs74vjiQ2KJgp%24&amp;data=04%7C01%7Cjalaj.asher%40eclinicalworks.com%7C3f5dd36a4b0d458695d908d8a1371f11%7C7ce747e48f6d4e0697efa9b76a063808%7C1%7C0%7C637436605411941490%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&amp;sdata=j4JvD%2BB6TzoymQAJookdvrCXXLBvGncjNBlYQ%2BpAU1o%3D&amp;reserved=0 >

Technology Leadership Unleashing Business Potential


Shawn​

Beard
Sr. Systems Engineer
|
BTS
Middleware Engineering
|
+1-515-564-2528<tel:+1-515-564-2528>
|
[hidden email]<mailto:[hidden email]>

CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[
�\�\��][��X��ܚX�P�X�] �\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�\�\��Z[�X�] �\X�K�ܙ�B�

CONFIDENTIALITY NOTICE TO RECIPIENT: This transmission contains confidential information belonging to the sender that is legally privileged and proprietary and may be subject to protection under the law, including the Health Insurance Portability and Accountability Act (HIPAA). If you are not the intended recipient of this e-mail, you are prohibited from sharing, copying, or otherwise using or disclosing its contents. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and permanently delete this e-mail and any attachments without reading, forwarding or saving them. Thank you.

CONFIDENTIALITY NOTICE TO RECIPIENT: This transmission contains confidential information belonging to the sender that is legally privileged and proprietary and may be subject to protection under the law, including the Health Insurance Portability and Accountability Act (HIPAA). If you are not the intended recipient of this e-mail, you are prohibited from sharing, copying, or otherwise using or disclosing its contents. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and permanently delete this e-mail and any attachments without reading, forwarding or saving them. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: jdbc connction pool issues [EXTERNAL]

Beard, Shawn M.
Is there a specific factory I should be loading? Or is not specifying and allowing default good enough? It is a jdbc connection pool, catalina home is set correctly.



Shawn​          Beard

Sr. Systems Engineer     |
        BTS

Middleware Engineering   |      +1-515-564-2528<tel:+1-515-564-2528>     |      [hidden email]<mailto:[hidden email]>









-----Original Message-----
From: Jalaj Asher <[hidden email]>
Sent: Tuesday, December 15, 2020 2:39 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

** CAUTION: External message


Hi Shawn,
Check the Catalina home and see if your tomcat set up Is pointed to the correct path.
You can check that from the registry as well to make sure the service is not pointed to another tomcat which might have these parameters setup.

The registry path is HKEY_LOCAL_MACHINE --> software-->wow6432node ---> apache software foundation.

Else you might want to check if the same is a problem with DBCP pool as well . As from the details shared looks like you are using jdbc pool.

Regards

Jalaj

-----Original Message-----
From: Johnson, Jim <[hidden email]>
Sent: Tuesday, December 15, 2020 3:22 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

Attention: This email was sent from someone outside of eClinicalWorks. Always use caution when opening attachments or clicking links from unknown senders or when receiving unexpected emails.

Hi Shawn,

No, I don't think that maxActive means that it's defining the maximum number of connections for the pool, I think it's strictly referring to the "[ .. ] maximum number of *active connections* that can be allocated from this pool at the same time. [ .. ]" (emphasis mine on active connections)

Here is the doc that I've been referring to - sorry for not linking it earlier:
https://urldefense.com/v3/__https://nam05.safelinks.protection.outlook.com/?url=https*3A*2F*2Ftomcat.apache.org*2Ftomcat-9.0-doc*2Fjdbc-pool.html&amp;data=04*7C01*7Cjalaj.asher*40eclinicalworks.com*7C3f5dd36a4b0d458695d908d8a1371f11*7C7ce747e48f6d4e0697efa9b76a063808*7C1*7C0*7C637436605411941490*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000&amp;sdata=bPYOMGVa0dYi0ASx*2BuQ5pTdlzpuOKird7pAVi*2FjHQVs*3D&amp;reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSU!!Li8W9_Um1Taa!q2MG45FC18cm0UD-N10yCZgPVqpaQaZGKILOaYz6c1kiDPaCBBP5Q1UZoCWfvJtl$

On those other Tomcat servers is there a initialSize defined?

Jim

-----Original Message-----
From: Beard, Shawn <[hidden email]>
Sent: Tuesday, December 15, 2020 2:49 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

But wouldn’t maxActive mean the connection pool has a max of 50 conenctions? On other tomcat servers I have, maxActive is set to 50 and I verified im jmx that there are 50 max connections on the connection pool.

Here though I checked jmx, sure enough, its max connections is 8.



Shawn​ Beard

Sr. Systems Engineer |
BTS

Middleware Engineering | +1-515-564-2528<tel:+1-515-564-2528> | [hidden email]<mailto:[hidden email]>









-----Original Message-----
From: Johnson, Jim <[hidden email]>
Sent: Tuesday, December 15, 2020 1:35 PM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

** CAUTION: External message


Hi Shawn,

I think you’re missing initialSize

initialSize
(int)The initial number of connections that are created when the pool is started. Default value is 10

maxActive
(int) The maximum number of active connections that can be allocated from this pool at the same time. The default value is 100

It would make sense that 8 connections would be 80% utilized.

I would try replacing maxActive with initialSize and seeing how that works for you.

Good luck!

- Jim

From: Beard, Shawn <[hidden email]>
Sent: Tuesday, December 15, 2020 2:12 PM
To: Tomcat Users List <[hidden email]>
Subject: jdbc connction pool issues

CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.

We have this jdbc connection pool set up:

<Resource name="jdbc/DataSource" auth="Container" type="javax.sql.DataSource"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
url="jdbc:sqlserver://hostname:1433;selectMethod=direct;databaseName=databasename;sendStringParametersAsUnicode=false"
username="XXX" password="XXXXXX" maxIdle="20" minIdle="10" maxActive="50"
maxWait="30000" testWhileIdle="true" testOnBorrow="true" validationQuery="SELECT 1"/>

However we are getting this error:
Resource Pool Limit Reached
Time 12/15/20 11:48:00 AM
Summary
JDBC Connection Pool Catalina:class=javax.sql.DataSource,context=/XX,host=XXXXXXXXX,name="jdbc/DataSource",type=DataSource has reached 80% limit. Current pool size [8, Max pool size [8]

Shouldn’t the max connections of the connection pool be 50 since maxActive is 50?



Shawn Beard • Sr. Systems Engineer
Middleware Engineering

[cid:image003.png@01D6D2E3.D5F1EFA0]

3840 109th Street Urbandale, IA 50322
Phone: +1-515-564-2528
Email: [hidden email]<mailto:[hidden email]>
Website: berkleytechnologyservices.com<https://urldefense.com/v3/__https://nam05.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.com*2Fv3*2F__https*3A*2F*2Fnam05.safelinks.protection.outlook.com*2F*3Furl*3Dhttps*3A*2F*2Fwww.berkleytechnologyservices.com*2F*26data*3D04*7C01*7CJ1Johnson*40unum.com*7C64e6e4965acb42aebfe708d8a12d798c*7Cd5952c785d4e41caaff07174c1f75393*7C0*7C0*7C637436563975240326*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*26sdata*3D3nTT6swXEeC2zC*2BUb7Q7nvgxM214SGf7HJaI*2F4*2BYupA*3D*26reserved*3D0__*3BJSUlJSUlJSUlJSUlJSUlJSUlJSU!!Li8W9_Um1Taa!qrMl5L--I8QMohhvL9LXmHKdJz0jf2lM2XTvoH8FwyisGVhxNJdYs74vjiQ2KJgp*24&amp;data=04*7C01*7Cjalaj.asher*40eclinicalworks.com*7C3f5dd36a4b0d458695d908d8a1371f11*7C7ce747e48f6d4e0697efa9b76a063808*7C1*7C0*7C637436605411941490*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000&amp;sdata=j4JvD*2BB6TzoymQAJookdvrCXXLBvGncjNBlYQ*2BpAU1o*3D&amp;reserved=0__;JSUlJSUlJSUlJSUqKioqJSUqKioqKioqKioqKiolJSoqKiolJSUlJSUlJSUlJSUlJSUlJSUl!!Li8W9_Um1Taa!q2MG45FC18cm0UD-N10yCZgPVqpaQaZGKILOaYz6c1kiDPaCBBP5Q1UZoNFJI5zh$ >

Technology Leadership Unleashing Business Potential


Shawn​

Beard
Sr. Systems Engineer
|
BTS
Middleware Engineering
|
+1-515-564-2528<tel:+1-515-564-2528>
|
[hidden email]<mailto:[hidden email]>

CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
B�KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB��[��X��ܚX�KK[XZ[
�\�\��][��X��ܚX�P�X�] �\X�K�ܙ�B��܈Y][ۘ[��[X[��K[XZ[
�\�\��Z[�X�] �\X�K�ܙ�B�

CONFIDENTIALITY NOTICE TO RECIPIENT: This transmission contains confidential information belonging to the sender that is legally privileged and proprietary and may be subject to protection under the law, including the Health Insurance Portability and Accountability Act (HIPAA). If you are not the intended recipient of this e-mail, you are prohibited from sharing, copying, or otherwise using or disclosing its contents. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and permanently delete this e-mail and any attachments without reading, forwarding or saving them. Thank you.

CONFIDENTIALITY NOTICE TO RECIPIENT: This transmission contains confidential information belonging to the sender that is legally privileged and proprietary and may be subject to protection under the law, including the Health Insurance Portability and Accountability Act (HIPAA). If you are not the intended recipient of this e-mail, you are prohibited from sharing, copying, or otherwise using or disclosing its contents. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and permanently delete this e-mail and any attachments without reading, forwarding or saving them. Thank you.
CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
Reply | Threaded
Open this post in threaded view
|

Re: jdbc connction pool issues [EXTERNAL]

Phil Steitz-2
In reply to this post by Beard, Shawn M.

On 12/15/20 1:35 PM, Beard, Shawn wrote:
> No intitialSize is not defined.
>
> Im getting the data to verify from JMX, however we also have an APM called appdynamics loaded. Both verified the 8 max connections.
>
> Other tomcat servers with exact same jdbc connection pool config(only difference is servername, databasename, user and pass) show 50 max connections, which is what maxActive is set to.

Are the other tomcat servers running the same tomcat version? Since TC8,
the default connection pool is DBCP2 which uses maxTotal in place of
maxActive.  See [1]. If you are running 8+, s/maxActive/maxTotal in the
config should work.

Phil

[1] https://tomcat.apache.org/migration-8.html#Database_Connection_Pooling

>
>
>
> Shawn​          Beard
>
> Sr. Systems Engineer     |
>          BTS
>
> Middleware Engineering   |      +1-515-564-2528<tel:+1-515-564-2528>     |      [hidden email]<mailto:[hidden email]>
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Johnson, Jim <[hidden email]>
> Sent: Tuesday, December 15, 2020 2:22 PM
> To: Tomcat Users List <[hidden email]>
> Subject: RE: jdbc connction pool issues [EXTERNAL]
>
> ** CAUTION: External message
>
>
> Hi Shawn,
>
> No, I don't think that maxActive means that it's defining the maximum number of connections for the pool, I think it's strictly referring to the "[ .. ] maximum number of *active connections* that can be allocated from this pool at the same time. [ .. ]" (emphasis mine on active connections)
>
> Here is the doc that I've been referring to - sorry for not linking it earlier:
> https://urldefense.com/v3/__https://tomcat.apache.org/tomcat-9.0-doc/jdbc-pool.html__;!!Li8W9_Um1Taa!vJGrxr7yc86joO5r6QoNstpipfempGFqrYRe3_NyAIGNs-LenmBWhtjn1fRiAOex$
>
> On those other Tomcat servers is there a initialSize defined?
>
> Jim
>
> -----Original Message-----
> From: Beard, Shawn <[hidden email]>
> Sent: Tuesday, December 15, 2020 2:49 PM
> To: Tomcat Users List <[hidden email]>
> Subject: RE: jdbc connction pool issues [EXTERNAL]
>
> But wouldn’t maxActive mean the connection pool has a max of 50 conenctions? On other tomcat servers I have, maxActive is set to 50 and I verified im jmx that there are 50 max connections on the connection pool.
>
> Here though I checked jmx, sure enough, its max connections is 8.
>
>
>
> Shawn​ Beard
>
> Sr. Systems Engineer |
> BTS
>
> Middleware Engineering | +1-515-564-2528<tel:+1-515-564-2528> | [hidden email]<mailto:[hidden email]>
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Johnson, Jim <[hidden email]>
> Sent: Tuesday, December 15, 2020 1:35 PM
> To: Tomcat Users List <[hidden email]>
> Subject: RE: jdbc connction pool issues [EXTERNAL]
>
> ** CAUTION: External message
>
>
> Hi Shawn,
>
> I think you’re missing initialSize
>
> initialSize
> (int)The initial number of connections that are created when the pool is started. Default value is 10
>
> maxActive
> (int) The maximum number of active connections that can be allocated from this pool at the same time. The default value is 100
>
> It would make sense that 8 connections would be 80% utilized.
>
> I would try replacing maxActive with initialSize and seeing how that works for you.
>
> Good luck!
>
> - Jim
>
> From: Beard, Shawn <[hidden email]>
> Sent: Tuesday, December 15, 2020 2:12 PM
> To: Tomcat Users List <[hidden email]>
> Subject: jdbc connction pool issues
>
> CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> We have this jdbc connection pool set up:
>
> <Resource name="jdbc/DataSource" auth="Container" type="javax.sql.DataSource"
> driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
> url="jdbc:sqlserver://hostname:1433;selectMethod=direct;databaseName=databasename;sendStringParametersAsUnicode=false"
> username="XXX" password="XXXXXX" maxIdle="20" minIdle="10" maxActive="50"
> maxWait="30000" testWhileIdle="true" testOnBorrow="true" validationQuery="SELECT 1"/>
>
> However we are getting this error:
> Resource Pool Limit Reached
> Time 12/15/20 11:48:00 AM
> Summary
> JDBC Connection Pool Catalina:class=javax.sql.DataSource,context=/XX,host=XXXXXXXXX,name="jdbc/DataSource",type=DataSource has reached 80% limit. Current pool size [8, Max pool size [8]
>
> Shouldn’t the max connections of the connection pool be 50 since maxActive is 50?
>
>
>
> Shawn Beard • Sr. Systems Engineer
> Middleware Engineering
>
> [cid:image003.png@01D6D2E3.D5F1EFA0]
>
> 3840 109th Street Urbandale, IA 50322
> Phone: +1-515-564-2528
> Email: [hidden email]<mailto:[hidden email]>
> Website: berkleytechnologyservices.com<https://urldefense.com/v3/__https://nam05.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.com*2Fv3*2F__https*3A*2F*2Fnam05.safelinks.protection.outlook.com*2F*3Furl*3Dhttps*3A*2F*2Fwww.berkleytechnologyservices.com*2F*26data*3D04*7C01*7CJ1Johnson*40unum.com*7C64e6e4965acb42aebfe708d8a12d798c*7Cd5952c785d4e41caaff07174c1f75393*7C0*7C0*7C637436563975240326*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*26sdata*3D3nTT6swXEeC2zC*2BUb7Q7nvgxM214SGf7HJaI*2F4*2BYupA*3D*26reserved*3D0__*3BJSUlJSUlJSUlJSUlJSUlJSUlJSU!!Li8W9_Um1Taa!qrMl5L--I8QMohhvL9LXmHKdJz0jf2lM2XTvoH8FwyisGVhxNJdYs74vjiQ2KJgp*24&amp;data=04*7C01*7CJ1Johnson*40unum.com*7C016565a918474642884608d8a1328579*7Cd5952c785d4e41caaff07174c1f75393*7C0*7C0*7C637436585655273329*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C2000&amp;sdata=tBYkHrqnGHyaJPmtqrHIB5LPJLsZfdU4YdsK2JFVwAo*3D&amp;reserved=0__;JSUlJSUlJSUlJSUqKioqJSUqKioqKioqKioqKiolJSoqKiolJSUlJSUlJSUlJSUlJSUlJQ!!Li8W9_Um1Taa!vJGrxr7yc86joO5r6QoNstpipfempGFqrYRe3_NyAIGNs-LenmBWhtjn1ZVqcYXS$ >
>
> Technology Leadership Unleashing Business Potential
>
>
> Shawn​
>
> Beard
> Sr. Systems Engineer
> |
> BTS
> Middleware Engineering
> |
> +1-515-564-2528<tel:+1-515-564-2528>
> |
> [hidden email]<mailto:[hidden email]>
>
> CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
> CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
> CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: jdbc connction pool issues [EXTERNAL]

Beard, Shawn M.
Yes same version of tomcat 9.0.31, however the one having issues is running java 8 where the one that shows things correctly is running java 11.



Shawn​          Beard

Sr. Systems Engineer     |
        BTS

Middleware Engineering   |      +1-515-564-2528<tel:+1-515-564-2528>     |      [hidden email]<mailto:[hidden email]>









-----Original Message-----
From: Phil Steitz <[hidden email]>
Sent: Tuesday, December 15, 2020 3:37 PM
To: [hidden email]
Subject: Re: jdbc connction pool issues [EXTERNAL]

** CAUTION: External message


On 12/15/20 1:35 PM, Beard, Shawn wrote:
> No intitialSize is not defined.
>
> Im getting the data to verify from JMX, however we also have an APM called appdynamics loaded. Both verified the 8 max connections.
>
> Other tomcat servers with exact same jdbc connection pool config(only difference is servername, databasename, user and pass) show 50 max connections, which is what maxActive is set to.

Are the other tomcat servers running the same tomcat version? Since TC8, the default connection pool is DBCP2 which uses maxTotal in place of maxActive. See [1]. If you are running 8+, s/maxActive/maxTotal in the config should work.

Phil

[1] https://urldefense.com/v3/__https://tomcat.apache.org/migration-8.html*Database_Connection_Pooling__;Iw!!Li8W9_Um1Taa!orxL7Ci-tTj7jM-90ooXXY8VTcDfIzFLc9YZw4Oh-ybxGw-BbIQv4_O0_vGUlXfF$

>
>
>
> Shawn​ Beard
>
> Sr. Systems Engineer |
> BTS
>
> Middleware Engineering | +1-515-564-2528<tel:+1-515-564-2528> | [hidden email]<mailto:[hidden email]>
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Johnson, Jim <[hidden email]>
> Sent: Tuesday, December 15, 2020 2:22 PM
> To: Tomcat Users List <[hidden email]>
> Subject: RE: jdbc connction pool issues [EXTERNAL]
>
> ** CAUTION: External message
>
>
> Hi Shawn,
>
> No, I don't think that maxActive means that it's defining the maximum
> number of connections for the pool, I think it's strictly referring to
> the "[ .. ] maximum number of *active connections* that can be
> allocated from this pool at the same time. [ .. ]" (emphasis mine on
> active connections)
>
> Here is the doc that I've been referring to - sorry for not linking it earlier:
> https://urldefense.com/v3/__https://tomcat.apache.org/tomcat-9.0-doc/j
> dbc-pool.html__;!!Li8W9_Um1Taa!vJGrxr7yc86joO5r6QoNstpipfempGFqrYRe3_N
> yAIGNs-LenmBWhtjn1fRiAOex$
>
> On those other Tomcat servers is there a initialSize defined?
>
> Jim
>
> -----Original Message-----
> From: Beard, Shawn <[hidden email]>
> Sent: Tuesday, December 15, 2020 2:49 PM
> To: Tomcat Users List <[hidden email]>
> Subject: RE: jdbc connction pool issues [EXTERNAL]
>
> But wouldn’t maxActive mean the connection pool has a max of 50 conenctions? On other tomcat servers I have, maxActive is set to 50 and I verified im jmx that there are 50 max connections on the connection pool.
>
> Here though I checked jmx, sure enough, its max connections is 8.
>
>
>
> Shawn​ Beard
>
> Sr. Systems Engineer |
> BTS
>
> Middleware Engineering | +1-515-564-2528<tel:+1-515-564-2528> |
> [hidden email]<mailto:[hidden email]>
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Johnson, Jim <[hidden email]>
> Sent: Tuesday, December 15, 2020 1:35 PM
> To: Tomcat Users List <[hidden email]>
> Subject: RE: jdbc connction pool issues [EXTERNAL]
>
> ** CAUTION: External message
>
>
> Hi Shawn,
>
> I think you’re missing initialSize
>
> initialSize
> (int)The initial number of connections that are created when the pool
> is started. Default value is 10
>
> maxActive
> (int) The maximum number of active connections that can be allocated
> from this pool at the same time. The default value is 100
>
> It would make sense that 8 connections would be 80% utilized.
>
> I would try replacing maxActive with initialSize and seeing how that works for you.
>
> Good luck!
>
> - Jim
>
> From: Beard, Shawn <[hidden email]>
> Sent: Tuesday, December 15, 2020 2:12 PM
> To: Tomcat Users List <[hidden email]>
> Subject: jdbc connction pool issues
>
> CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> We have this jdbc connection pool set up:
>
> <Resource name="jdbc/DataSource" auth="Container" type="javax.sql.DataSource"
> driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
> url="jdbc:sqlserver://hostname:1433;selectMethod=direct;databaseName=databasename;sendStringParametersAsUnicode=false"
> username="XXX" password="XXXXXX" maxIdle="20" minIdle="10" maxActive="50"
> maxWait="30000" testWhileIdle="true" testOnBorrow="true"
> validationQuery="SELECT 1"/>
>
> However we are getting this error:
> Resource Pool Limit Reached
> Time 12/15/20 11:48:00 AM
> Summary
> JDBC Connection Pool
> Catalina:class=javax.sql.DataSource,context=/XX,host=XXXXXXXXX,name="j
> dbc/DataSource",type=DataSource has reached 80% limit. Current pool
> size [8, Max pool size [8]
>
> Shouldn’t the max connections of the connection pool be 50 since maxActive is 50?
>
>
>
> Shawn Beard • Sr. Systems Engineer
> Middleware Engineering
>
> [cid:image003.png@01D6D2E3.D5F1EFA0]
>
> 3840 109th Street Urbandale, IA 50322
> Phone: +1-515-564-2528
> Email: [hidden email]<mailto:[hidden email]>
> Website:
> berkleytechnologyservices.com<https://urldefense.com/v3/__https://nam0
> 5.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.com*2
> Fv3*2F__https*3A*2F*2Fnam05.safelinks.protection.outlook.com*2F*3Furl*
> 3Dhttps*3A*2F*2Fwww.berkleytechnologyservices.com*2F*26data*3D04*7C01*
> 7CJ1Johnson*40unum.com*7C64e6e4965acb42aebfe708d8a12d798c*7Cd5952c785d
> 4e41caaff07174c1f75393*7C0*7C0*7C637436563975240326*7CUnknown*7CTWFpbG
> Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*
> 3D*7C3000*26sdata*3D3nTT6swXEeC2zC*2BUb7Q7nvgxM214SGf7HJaI*2F4*2BYupA*
> 3D*26reserved*3D0__*3BJSUlJSUlJSUlJSUlJSUlJSUlJSU!!Li8W9_Um1Taa!qrMl5L
> --I8QMohhvL9LXmHKdJz0jf2lM2XTvoH8FwyisGVhxNJdYs74vjiQ2KJgp*24&amp;data
> =04*7C01*7CJ1Johnson*40unum.com*7C016565a918474642884608d8a1328579*7Cd
> 5952c785d4e41caaff07174c1f75393*7C0*7C0*7C637436585655273329*7CUnknown
> *7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJ
> XVCI6Mn0*3D*7C2000&amp;sdata=tBYkHrqnGHyaJPmtqrHIB5LPJLsZfdU4YdsK2JFVw
> Ao*3D&amp;reserved=0__;JSUlJSUlJSUlJSUqKioqJSUqKioqKioqKioqKiolJSoqKio
> lJSUlJSUlJSUlJSUlJSUlJQ!!Li8W9_Um1Taa!vJGrxr7yc86joO5r6QoNstpipfempGFq
> rYRe3_NyAIGNs-LenmBWhtjn1ZVqcYXS$ >
>
> Technology Leadership Unleashing Business Potential
>
>
> Shawn​
>
> Beard
> Sr. Systems Engineer
> |
> BTS
> Middleware Engineering
> |
> +1-515-564-2528<tel:+1-515-564-2528>
> |
> [hidden email]<mailto:[hidden email]>
>
> CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
> CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
> CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
Reply | Threaded
Open this post in threaded view
|

RE: jdbc connction pool issues [EXTERNAL]

Beard, Shawn M.
I was able to fix this. I added this to the config:

factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"

I was then seeing maxConnections of 50 in jmx and not 8.



Shawn​          Beard

Sr. Systems Engineer     |
        BTS

Middleware Engineering   |      +1-515-564-2528<tel:+1-515-564-2528>     |      [hidden email]<mailto:[hidden email]>









-----Original Message-----
From: Beard, Shawn <[hidden email]>
Sent: Wednesday, December 16, 2020 7:43 AM
To: Tomcat Users List <[hidden email]>
Subject: RE: jdbc connction pool issues [EXTERNAL]

** CAUTION: External message


Yes same version of tomcat 9.0.31, however the one having issues is running java 8 where the one that shows things correctly is running java 11.



Shawn​ Beard

Sr. Systems Engineer |
BTS

Middleware Engineering | +1-515-564-2528<tel:+1-515-564-2528> | [hidden email]<mailto:[hidden email]>









-----Original Message-----
From: Phil Steitz <[hidden email]>
Sent: Tuesday, December 15, 2020 3:37 PM
To: [hidden email]
Subject: Re: jdbc connction pool issues [EXTERNAL]

** CAUTION: External message


On 12/15/20 1:35 PM, Beard, Shawn wrote:
> No intitialSize is not defined.
>
> Im getting the data to verify from JMX, however we also have an APM called appdynamics loaded. Both verified the 8 max connections.
>
> Other tomcat servers with exact same jdbc connection pool config(only difference is servername, databasename, user and pass) show 50 max connections, which is what maxActive is set to.

Are the other tomcat servers running the same tomcat version? Since TC8, the default connection pool is DBCP2 which uses maxTotal in place of maxActive. See [1]. If you are running 8+, s/maxActive/maxTotal in the config should work.

Phil

[1] https://urldefense.com/v3/__https://tomcat.apache.org/migration-8.html*Database_Connection_Pooling__;Iw!!Li8W9_Um1Taa!orxL7Ci-tTj7jM-90ooXXY8VTcDfIzFLc9YZw4Oh-ybxGw-BbIQv4_O0_vGUlXfF$

>
>
>
> Shawn​ Beard
>
> Sr. Systems Engineer |
> BTS
>
> Middleware Engineering | +1-515-564-2528<tel:+1-515-564-2528> |
> [hidden email]<mailto:[hidden email]>
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Johnson, Jim <[hidden email]>
> Sent: Tuesday, December 15, 2020 2:22 PM
> To: Tomcat Users List <[hidden email]>
> Subject: RE: jdbc connction pool issues [EXTERNAL]
>
> ** CAUTION: External message
>
>
> Hi Shawn,
>
> No, I don't think that maxActive means that it's defining the maximum
> number of connections for the pool, I think it's strictly referring to
> the "[ .. ] maximum number of *active connections* that can be
> allocated from this pool at the same time. [ .. ]" (emphasis mine on
> active connections)
>
> Here is the doc that I've been referring to - sorry for not linking it earlier:
> https://urldefense.com/v3/__https://tomcat.apache.org/tomcat-9.0-doc/j
> dbc-pool.html__;!!Li8W9_Um1Taa!vJGrxr7yc86joO5r6QoNstpipfempGFqrYRe3_N
> yAIGNs-LenmBWhtjn1fRiAOex$
>
> On those other Tomcat servers is there a initialSize defined?
>
> Jim
>
> -----Original Message-----
> From: Beard, Shawn <[hidden email]>
> Sent: Tuesday, December 15, 2020 2:49 PM
> To: Tomcat Users List <[hidden email]>
> Subject: RE: jdbc connction pool issues [EXTERNAL]
>
> But wouldn’t maxActive mean the connection pool has a max of 50 conenctions? On other tomcat servers I have, maxActive is set to 50 and I verified im jmx that there are 50 max connections on the connection pool.
>
> Here though I checked jmx, sure enough, its max connections is 8.
>
>
>
> Shawn​ Beard
>
> Sr. Systems Engineer |
> BTS
>
> Middleware Engineering | +1-515-564-2528<tel:+1-515-564-2528> |
> [hidden email]<mailto:[hidden email]>
>
>
>
>
>
>
>
>
>
> -----Original Message-----
> From: Johnson, Jim <[hidden email]>
> Sent: Tuesday, December 15, 2020 1:35 PM
> To: Tomcat Users List <[hidden email]>
> Subject: RE: jdbc connction pool issues [EXTERNAL]
>
> ** CAUTION: External message
>
>
> Hi Shawn,
>
> I think you’re missing initialSize
>
> initialSize
> (int)The initial number of connections that are created when the pool
> is started. Default value is 10
>
> maxActive
> (int) The maximum number of active connections that can be allocated
> from this pool at the same time. The default value is 100
>
> It would make sense that 8 connections would be 80% utilized.
>
> I would try replacing maxActive with initialSize and seeing how that works for you.
>
> Good luck!
>
> - Jim
>
> From: Beard, Shawn <[hidden email]>
> Sent: Tuesday, December 15, 2020 2:12 PM
> To: Tomcat Users List <[hidden email]>
> Subject: jdbc connction pool issues
>
> CAUTION EXTERNAL EMAIL: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> We have this jdbc connection pool set up:
>
> <Resource name="jdbc/DataSource" auth="Container" type="javax.sql.DataSource"
> driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDriver"
> url="jdbc:sqlserver://hostname:1433;selectMethod=direct;databaseName=databasename;sendStringParametersAsUnicode=false"
> username="XXX" password="XXXXXX" maxIdle="20" minIdle="10" maxActive="50"
> maxWait="30000" testWhileIdle="true" testOnBorrow="true"
> validationQuery="SELECT 1"/>
>
> However we are getting this error:
> Resource Pool Limit Reached
> Time 12/15/20 11:48:00 AM
> Summary
> JDBC Connection Pool
> Catalina:class=javax.sql.DataSource,context=/XX,host=XXXXXXXXX,name="j
> dbc/DataSource",type=DataSource has reached 80% limit. Current pool
> size [8, Max pool size [8]
>
> Shouldn’t the max connections of the connection pool be 50 since maxActive is 50?
>
>
>
> Shawn Beard • Sr. Systems Engineer
> Middleware Engineering
>
> [cid:image003.png@01D6D2E3.D5F1EFA0]
>
> 3840 109th Street Urbandale, IA 50322
> Phone: +1-515-564-2528
> Email: [hidden email]<mailto:[hidden email]>
> Website:
> berkleytechnologyservices.com<https://urldefense.com/v3/__https://nam0
> 5.safelinks.protection.outlook.com/?url=https*3A*2F*2Furldefense.com*2
> Fv3*2F__https*3A*2F*2Fnam05.safelinks.protection.outlook.com*2F*3Furl*
> 3Dhttps*3A*2F*2Fwww.berkleytechnologyservices.com*2F*26data*3D04*7C01*
> 7CJ1Johnson*40unum.com*7C64e6e4965acb42aebfe708d8a12d798c*7Cd5952c785d
> 4e41caaff07174c1f75393*7C0*7C0*7C637436563975240326*7CUnknown*7CTWFpbG
> Zsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*
> 3D*7C3000*26sdata*3D3nTT6swXEeC2zC*2BUb7Q7nvgxM214SGf7HJaI*2F4*2BYupA*
> 3D*26reserved*3D0__*3BJSUlJSUlJSUlJSUlJSUlJSUlJSU!!Li8W9_Um1Taa!qrMl5L
> --I8QMohhvL9LXmHKdJz0jf2lM2XTvoH8FwyisGVhxNJdYs74vjiQ2KJgp*24&amp;data
> =04*7C01*7CJ1Johnson*40unum.com*7C016565a918474642884608d8a1328579*7Cd
> 5952c785d4e41caaff07174c1f75393*7C0*7C0*7C637436585655273329*7CUnknown
> *7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJ
> XVCI6Mn0*3D*7C2000&amp;sdata=tBYkHrqnGHyaJPmtqrHIB5LPJLsZfdU4YdsK2JFVw
> Ao*3D&amp;reserved=0__;JSUlJSUlJSUlJSUqKioqJSUqKioqKioqKioqKiolJSoqKio
> lJSUlJSUlJSUlJSUlJSUlJQ!!Li8W9_Um1Taa!vJGrxr7yc86joO5r6QoNstpipfempGFq
> rYRe3_NyAIGNs-LenmBWhtjn1ZVqcYXS$ >
>
> Technology Leadership Unleashing Business Potential
>
>
> Shawn​
>
> Beard
> Sr. Systems Engineer
> |
> BTS
> Middleware Engineering
> |
> +1-515-564-2528<tel:+1-515-564-2528>
> |
> [hidden email]<mailto:[hidden email]>
>
> CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
> CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
> CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
Reply | Threaded
Open this post in threaded view
|

Re: jdbc connction pool issues [EXTERNAL]

Christopher Schultz-2
Shawn,

On 12/17/20 11:04, Beard, Shawn wrote:
> I was able to fix this. I added this to the config:
>
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>
> I was then seeing maxConnections of 50 in jmx and not 8.

So Phil was right: you needed to s/maxActive/maxTotal/.

That doesn't sounds right if "all your other servers are working with
the same config and Tomcat version" so something isn't right about that
statement. *Something* is different.

Switching to the Tomcat jdbc-pool again uses "maxActive" instead of
"maxTotal" as the configuration option for the largest number of
connections allowed in the pool, which is why it works when you change it.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: jdbc connction pool issues [EXTERNAL]

Beard, Shawn M.
Well the other tomcat servers had a custom factory specified. That was the only difference. (devs wrote their own library for it)
So I looked in tomcat documentation and tried loading a out of the box factory that was available. That’s when it was picking up the maxActive setting and I started seeing that setting properly reflected in JMX.

    
Shawn  Beard  • Sr. Systems Engineer
Middleware Engineering
3840 109th Street Urbandale IA  50322
Phone: <a href="tel:&#43;1-515-564-2528" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#000001;">+1-515-564-2528
Email:  [hidden email]
Website: https://berkleytechnologyservices.com/
Technology Leadership Unleashing Business Potential

 


-----Original Message-----
From: Christopher Schultz <[hidden email]>
Sent: Thursday, December 17, 2020 1:02 PM
To: [hidden email]
Subject: Re: jdbc connction pool issues [EXTERNAL]

** CAUTION: External message


Shawn,

On 12/17/20 11:04, Beard, Shawn wrote:
> I was able to fix this. I added this to the config:
>
> factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
>
> I was then seeing maxConnections of 50 in jmx and not 8.

So Phil was right: you needed to s/maxActive/maxTotal/.

That doesn't sounds right if "all your other servers are working with the same config and Tomcat version" so something isn't right about that statement. *Something* is different.

Switching to the Tomcat jdbc-pool again uses "maxActive" instead of "maxTotal" as the configuration option for the largest number of connections allowed in the pool, which is why it works when you change it.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.
Reply | Threaded
Open this post in threaded view
|

Re: jdbc connction pool issues [EXTERNAL]

Christopher Schultz-2
Shawn,

On 12/17/20 14:21, Beard, Shawn wrote:
> Well the other tomcat servers had a custom factory specified. That
> was the only difference. (devs wrote their own library for it)
So they were different. It's always misleading when getting a report
like this:

On 12/15/20 15:35, Beard, Shawn wrote:
> Other tomcat servers with exact same jdbc connection pool
> config(only difference is servername, databasename, user and pass)
> show 50 max connections, which is what maxActive is set to.
So you can see why we were maybe confused about what was happening.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

RE: jdbc connction pool issues [EXTERNAL]

Beard, Shawn M.
Yeah I didn’t consider that relevant at the time. All examples of creating a jdbc connection pool for SQL server on tomcat did not have specifying the factory in them. So I didn’t consider it relevant. My bad.

    
Shawn  Beard  • Sr. Systems Engineer
Middleware Engineering
3840 109th Street Urbandale IA  50322
Phone: <a href="tel:&#43;1-515-564-2528" target="_blank" id="LPlnk689713" style="text-decoration:none;color:#000001;">+1-515-564-2528
Email:  [hidden email]
Website: https://berkleytechnologyservices.com/
Technology Leadership Unleashing Business Potential

 


-----Original Message-----
From: Christopher Schultz <[hidden email]>
Sent: Friday, December 18, 2020 7:22 AM
To: Tomcat Users List <[hidden email]>
Subject: Re: jdbc connction pool issues [EXTERNAL]

** CAUTION: External message


Shawn,

On 12/17/20 14:21, Beard, Shawn wrote:
> Well the other tomcat servers had a custom factory specified. That was
> the only difference. (devs wrote their own library for it)
So they were different. It's always misleading when getting a report like this:

On 12/15/20 15:35, Beard, Shawn wrote:
> Other tomcat servers with exact same jdbc connection pool config(only
> difference is servername, databasename, user and pass) show 50 max
> connections, which is what maxActive is set to.
So you can see why we were maybe confused about what was happening.

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

CONFIDENTIALITY NOTICE: This e-mail and the transmitted documents contain private, privileged and confidential information belonging to the sender. The information therein is solely for the use of the addressee. If your receipt of this transmission has occurred as the result of an error, please immediately notify us so we can arrange for the return of the documents. In such circumstances, you are advised that you may not disclose, copy, distribute or take any other action in reliance on the information transmitted.