You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mohamed Eliyas Abdul Kadar <mo...@neogenomics.com> on 2022/05/04 21:29:03 UTC

Connection pool

Hi All
I am trying to limit the db connections on the oracle side by limiting the size of connection pool in the datasource config as below. I tried setting the max size to 20 by maxTotal/ maxActive either of them didn't work. The db side connection was always more than 30. Please advise.


<Resource name="jdbc/portal" auth="Container" type="javax.sql.DataSource"
 initialSize="10" maxTotal="10"  maxIdle="10"  maxWaitMillis="10000"
username="PORTAL" password="cde"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@cde" factory="SecureDataSource"/>

Regards
Mohamed
This communication and its attachments contain confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this communication. Please notify the sender immediately if you have received this communication by mistake and delete or destroy this communication. Communications cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this communication which arise as a result of transmission. If verification is required please request a hard-copy version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers, FL 33912, http://www.neogenomics.com (2022)

RE: [EXTERNAL] Re: Connection pool

Posted by Mohamed Eliyas Abdul Kadar <mo...@neogenomics.com>.
Please  find below :

C:\apache-tomcat-9.0.45\conf

-----Original Message-----
From: Mark Thomas <ma...@apache.org>
Sent: Thursday, May 5, 2022 8:43 AM
To: users@tomcat.apache.org
Subject: Re: [EXTERNAL] Re: Connection pool

CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.

On 05/05/2022 16:39, Mohamed Eliyas Abdul Kadar wrote:
> This file is from context.xml for the datasource.

Repeating my previous question:

What is the full path to this context.xml file relative to CATALINA_BASE?

Mark


>
> C:\apache-tomcat-9.0.45\bin>startup.bat
> Using CATALINA_BASE:   "C:\apache-tomcat-9.0.45"
> Using CATALINA_HOME:   "C:\apache-tomcat-9.0.45"
> Using CATALINA_TMPDIR: "C:\apache-tomcat-9.0.45\temp"
> Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_281"
> Using CLASSPATH:       "C:\apache-tomcat-9.0.45\bin\bootstrap.jar;C:\apache-tomcat-9.0.45\bin\tomcat-juli.jar"
> Using CATALINA_OPTS:   ""
>
> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Wednesday, May 4, 2022 11:38 PM
> To: users@tomcat.apache.org
> Subject: [EXTERNAL] Re: Connection pool
>
> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>
> On 04/05/2022 22:29, Mohamed Eliyas Abdul Kadar wrote:
>> Hi All
>> I am trying to limit the db connections on the oracle side by limiting the size of connection pool in the datasource config as below. I tried setting the max size to 20 by maxTotal/ maxActive either of them didn't work. The db side connection was always more than 30. Please advise.
>>
>>
>> <Resource name="jdbc/portal" auth="Container" type="javax.sql.DataSource"
>>    initialSize="10" maxTotal="10"  maxIdle="10"  maxWaitMillis="10000"
>> username="PORTAL" password="cde"
>> driverClassName="oracle.jdbc.driver.OracleDriver"
>> url="jdbc:oracle:thin:@cde" factory="SecureDataSource"/>
>
> Which file is the above configuration snippet taken from? Full path relative to CATALINA_BASE please.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org This
> communication and its attachments contain confidential information and
> is intended only for the named addressee. If you are not the named
> addressee you should not disseminate, distribute or copy this
> communication. Please notify the sender immediately if you have
> received this communication by mistake and delete or destroy this
> communication. Communications cannot be guaranteed to be secured or
> error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this communication which arise as a result of
> transmission. If verification is required please request a hard-copy
> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
> FL 33912, http://www.neogenomics.com (2022)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
This communication and its attachments contain confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this communication. Please notify the sender immediately if you have received this communication by mistake and delete or destroy this communication. Communications cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this communication which arise as a result of transmission. If verification is required please request a hard-copy version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers, FL 33912, http://www.neogenomics.com (2022)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [EXTERNAL] Re: Connection pool

Posted by Mohamed Eliyas Abdul Kadar <mo...@neogenomics.com>.
Thank you Mark and Chris

-----Original Message-----
From: Christopher Schultz <ch...@christopherschultz.net>
Sent: Monday, May 9, 2022 12:13 PM
To: users@tomcat.apache.org
Subject: Re: [EXTERNAL] Re: Connection pool

CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.

Mohamed,

On 5/9/22 12:47, Mohamed Eliyas Abdul Kadar wrote:
> I need manager app to deploy the application, is there a way that can
> be avoided.

Yes.

> As you mentioned I have an application with 20 connections and with
> manager app it comes back as 40 connections on the db side.
You need to define the <Resource> in your application-specific deployment descriptor. Mark replied on 5 May saying:

"
> you need to define that pool as a global resource in server.xml and
> then use a ResourceLink in CATALINA_BASE/conf/context.xml
>
> Alternatively, you can define individual pools in each of the web
> application's individual context.xml file (META-INF/context.xml)."

If you need help interpreting what was written above or indeed implementing it, please let us know. But that's the answer: define the pool for a specific application and not in conf/context.xml.

-chris

> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Monday, May 9, 2022 8:47 AM
> To: users@tomcat.apache.org
> Subject: Re: [EXTERNAL] Re: Connection pool
>
> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>
> On 09/05/2022 16:42, Mohamed Eliyas Abdul Kadar wrote:
>> Does that mean manager app deployed on the tomcat will also influence creating of connection pools. Manager does not have ang datasource, even then will it induce connection pool.
>
> Yes.
>
> If you define the resource in CATALINA_BASE/conf/context.xml you get one instance of the resource for every web application deployed.
>
> Mark
>
>
>>
>> -----Original Message-----
>> From: Mark Thomas <ma...@apache.org>
>> Sent: Thursday, May 5, 2022 10:00 AM
>> To: users@tomcat.apache.org
>> Subject: Re: [EXTERNAL] Re: Connection pool
>>
>> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>>
>> On 05/05/2022 17:51, Mohamed Eliyas Abdul Kadar wrote:
>>>
>>> C:\apache-tomcat-9.0.45\conf which is CATALINA_BASE\conf
>>
>> The contents of the context.xml file placed in that located is inherited by every web application deployed to Tomcat. So, if you have three web applications deployed you will get three instances of your connection pool each with a maximum of 20 connections. That means your database server may see up to 60 connections.
>>
>> If you want one pool of 20 connections shared between all the
>> deployed web applications then you need to define that pool as a
>> global resource in server.xml and then use a ResourceLink in
>> CATALINA_BASE/conf/context.xml
>>
>> Alternatively, you can define individual pools in each of the web application's individual context.xml file (META-INF/context.xml).
>>
>> Mark
>>
>>
>>> -----Original Message-----
>>> From: Mark Thomas <ma...@apache.org>
>>> Sent: Thursday, May 5, 2022 8:43 AM
>>> To: users@tomcat.apache.org
>>> Subject: Re: [EXTERNAL] Re: Connection pool
>>>
>>> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>>>
>>> On 05/05/2022 16:39, Mohamed Eliyas Abdul Kadar wrote:
>>>> This file is from context.xml for the datasource.
>>>
>>> Repeating my previous question:
>>>
>>> What is the full path to this context.xml file relative to CATALINA_BASE?
>>>
>>> Mark
>>>
>>>
>>>>
>>>> C:\apache-tomcat-9.0.45\bin>startup.bat
>>>> Using CATALINA_BASE:   "C:\apache-tomcat-9.0.45"
>>>> Using CATALINA_HOME:   "C:\apache-tomcat-9.0.45"
>>>> Using CATALINA_TMPDIR: "C:\apache-tomcat-9.0.45\temp"
>>>> Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_281"
>>>> Using CLASSPATH:       "C:\apache-tomcat-9.0.45\bin\bootstrap.jar;C:\apache-tomcat-9.0.45\bin\tomcat-juli.jar"
>>>> Using CATALINA_OPTS:   ""
>>>>
>>>> -----Original Message-----
>>>> From: Mark Thomas <ma...@apache.org>
>>>> Sent: Wednesday, May 4, 2022 11:38 PM
>>>> To: users@tomcat.apache.org
>>>> Subject: [EXTERNAL] Re: Connection pool
>>>>
>>>> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>>>>
>>>> On 04/05/2022 22:29, Mohamed Eliyas Abdul Kadar wrote:
>>>>> Hi All
>>>>> I am trying to limit the db connections on the oracle side by limiting the size of connection pool in the datasource config as below. I tried setting the max size to 20 by maxTotal/ maxActive either of them didn't work. The db side connection was always more than 30. Please advise.
>>>>>
>>>>>
>>>>> <Resource name="jdbc/portal" auth="Container" type="javax.sql.DataSource"
>>>>>       initialSize="10" maxTotal="10"  maxIdle="10"  maxWaitMillis="10000"
>>>>> username="PORTAL" password="cde"
>>>>> driverClassName="oracle.jdbc.driver.OracleDriver"
>>>>> url="jdbc:oracle:thin:@cde" factory="SecureDataSource"/>
>>>>
>>>> Which file is the above configuration snippet taken from? Full path relative to CATALINA_BASE please.
>>>>
>>>> Mark
>>>>
>>>> -------------------------------------------------------------------
>>>> -
>>>> - To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org This
>>>> communication and its attachments contain confidential information
>>>> and is intended only for the named addressee. If you are not the
>>>> named addressee you should not disseminate, distribute or copy this
>>>> communication. Please notify the sender immediately if you have
>>>> received this communication by mistake and delete or destroy this
>>>> communication. Communications cannot be guaranteed to be secured or
>>>> error-free as information could be intercepted, corrupted, lost,
>>>> destroyed, arrive late or incomplete, or contain viruses. The
>>>> sender therefore does not accept liability for any errors or
>>>> omissions in the contents of this communication which arise as a
>>>> result of transmission. If verification is required please request
>>>> a hard-copy version. NeoGenomics Laboratories, 9490 NeoGenomics
>>>> Way, Fort Myers, FL 33912, http://www.neogenomics.com (2022)
>>>>
>>>> -------------------------------------------------------------------
>>>> -
>>>> - To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>
>>> --------------------------------------------------------------------
>>> - To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org This
>>> communication and its attachments contain confidential information
>>> and is intended only for the named addressee. If you are not the
>>> named addressee you should not disseminate, distribute or copy this
>>> communication. Please notify the sender immediately if you have
>>> received this communication by mistake and delete or destroy this
>>> communication. Communications cannot be guaranteed to be secured or
>>> error-free as information could be intercepted, corrupted, lost,
>>> destroyed, arrive late or incomplete, or contain viruses. The sender
>>> therefore does not accept liability for any errors or omissions in
>>> the contents of this communication which arise as a result of
>>> transmission. If verification is required please request a hard-copy
>>> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
>>> FL 33912, http://www.neogenomics.com (2022)
>>>
>>> --------------------------------------------------------------------
>>> - To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org This
>> communication and its attachments contain confidential information
>> and is intended only for the named addressee. If you are not the
>> named addressee you should not disseminate, distribute or copy this
>> communication. Please notify the sender immediately if you have
>> received this communication by mistake and delete or destroy this
>> communication. Communications cannot be guaranteed to be secured or
>> error-free as information could be intercepted, corrupted, lost,
>> destroyed, arrive late or incomplete, or contain viruses. The sender
>> therefore does not accept liability for any errors or omissions in
>> the contents of this communication which arise as a result of
>> transmission. If verification is required please request a hard-copy
>> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
>> FL 33912, http://www.neogenomics.com (2022)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org This
> communication and its attachments contain confidential information and
> is intended only for the named addressee. If you are not the named
> addressee you should not disseminate, distribute or copy this
> communication. Please notify the sender immediately if you have
> received this communication by mistake and delete or destroy this
> communication. Communications cannot be guaranteed to be secured or
> error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this communication which arise as a result of
> transmission. If verification is required please request a hard-copy
> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
> FL 33912, http://www.neogenomics.com (2022)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
This communication and its attachments contain confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this communication. Please notify the sender immediately if you have received this communication by mistake and delete or destroy this communication. Communications cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this communication which arise as a result of transmission. If verification is required please request a hard-copy version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers, FL 33912, http://www.neogenomics.com (2022)

Re: [EXTERNAL] Re: Connection pool

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Mohamed,

On 5/9/22 12:47, Mohamed Eliyas Abdul Kadar wrote:
> I need manager app to deploy the application, is there a way that can
> be avoided.

Yes.

> As you mentioned I have an application with 20 connections and with
> manager app it comes back as 40 connections on the db side.
You need to define the <Resource> in your application-specific 
deployment descriptor. Mark replied on 5 May saying:

"
> you need to define that pool as a global resource in server.xml and 
> then use a ResourceLink in CATALINA_BASE/conf/context.xml
> 
> Alternatively, you can define individual pools in each of the web 
> application's individual context.xml file (META-INF/context.xml)."

If you need help interpreting what was written above or indeed 
implementing it, please let us know. But that's the answer: define the 
pool for a specific application and not in conf/context.xml.

-chris

> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Monday, May 9, 2022 8:47 AM
> To: users@tomcat.apache.org
> Subject: Re: [EXTERNAL] Re: Connection pool
> 
> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
> 
> On 09/05/2022 16:42, Mohamed Eliyas Abdul Kadar wrote:
>> Does that mean manager app deployed on the tomcat will also influence creating of connection pools. Manager does not have ang datasource, even then will it induce connection pool.
> 
> Yes.
> 
> If you define the resource in CATALINA_BASE/conf/context.xml you get one instance of the resource for every web application deployed.
> 
> Mark
> 
> 
>>
>> -----Original Message-----
>> From: Mark Thomas <ma...@apache.org>
>> Sent: Thursday, May 5, 2022 10:00 AM
>> To: users@tomcat.apache.org
>> Subject: Re: [EXTERNAL] Re: Connection pool
>>
>> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>>
>> On 05/05/2022 17:51, Mohamed Eliyas Abdul Kadar wrote:
>>>
>>> C:\apache-tomcat-9.0.45\conf which is CATALINA_BASE\conf
>>
>> The contents of the context.xml file placed in that located is inherited by every web application deployed to Tomcat. So, if you have three web applications deployed you will get three instances of your connection pool each with a maximum of 20 connections. That means your database server may see up to 60 connections.
>>
>> If you want one pool of 20 connections shared between all the deployed
>> web applications then you need to define that pool as a global
>> resource in server.xml and then use a ResourceLink in
>> CATALINA_BASE/conf/context.xml
>>
>> Alternatively, you can define individual pools in each of the web application's individual context.xml file (META-INF/context.xml).
>>
>> Mark
>>
>>
>>> -----Original Message-----
>>> From: Mark Thomas <ma...@apache.org>
>>> Sent: Thursday, May 5, 2022 8:43 AM
>>> To: users@tomcat.apache.org
>>> Subject: Re: [EXTERNAL] Re: Connection pool
>>>
>>> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>>>
>>> On 05/05/2022 16:39, Mohamed Eliyas Abdul Kadar wrote:
>>>> This file is from context.xml for the datasource.
>>>
>>> Repeating my previous question:
>>>
>>> What is the full path to this context.xml file relative to CATALINA_BASE?
>>>
>>> Mark
>>>
>>>
>>>>
>>>> C:\apache-tomcat-9.0.45\bin>startup.bat
>>>> Using CATALINA_BASE:   "C:\apache-tomcat-9.0.45"
>>>> Using CATALINA_HOME:   "C:\apache-tomcat-9.0.45"
>>>> Using CATALINA_TMPDIR: "C:\apache-tomcat-9.0.45\temp"
>>>> Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_281"
>>>> Using CLASSPATH:       "C:\apache-tomcat-9.0.45\bin\bootstrap.jar;C:\apache-tomcat-9.0.45\bin\tomcat-juli.jar"
>>>> Using CATALINA_OPTS:   ""
>>>>
>>>> -----Original Message-----
>>>> From: Mark Thomas <ma...@apache.org>
>>>> Sent: Wednesday, May 4, 2022 11:38 PM
>>>> To: users@tomcat.apache.org
>>>> Subject: [EXTERNAL] Re: Connection pool
>>>>
>>>> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>>>>
>>>> On 04/05/2022 22:29, Mohamed Eliyas Abdul Kadar wrote:
>>>>> Hi All
>>>>> I am trying to limit the db connections on the oracle side by limiting the size of connection pool in the datasource config as below. I tried setting the max size to 20 by maxTotal/ maxActive either of them didn't work. The db side connection was always more than 30. Please advise.
>>>>>
>>>>>
>>>>> <Resource name="jdbc/portal" auth="Container" type="javax.sql.DataSource"
>>>>>       initialSize="10" maxTotal="10"  maxIdle="10"  maxWaitMillis="10000"
>>>>> username="PORTAL" password="cde"
>>>>> driverClassName="oracle.jdbc.driver.OracleDriver"
>>>>> url="jdbc:oracle:thin:@cde" factory="SecureDataSource"/>
>>>>
>>>> Which file is the above configuration snippet taken from? Full path relative to CATALINA_BASE please.
>>>>
>>>> Mark
>>>>
>>>> --------------------------------------------------------------------
>>>> - To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org This
>>>> communication and its attachments contain confidential information
>>>> and is intended only for the named addressee. If you are not the
>>>> named addressee you should not disseminate, distribute or copy this
>>>> communication. Please notify the sender immediately if you have
>>>> received this communication by mistake and delete or destroy this
>>>> communication. Communications cannot be guaranteed to be secured or
>>>> error-free as information could be intercepted, corrupted, lost,
>>>> destroyed, arrive late or incomplete, or contain viruses. The sender
>>>> therefore does not accept liability for any errors or omissions in
>>>> the contents of this communication which arise as a result of
>>>> transmission. If verification is required please request a hard-copy
>>>> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
>>>> FL 33912, http://www.neogenomics.com (2022)
>>>>
>>>> --------------------------------------------------------------------
>>>> - To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org This
>>> communication and its attachments contain confidential information
>>> and is intended only for the named addressee. If you are not the
>>> named addressee you should not disseminate, distribute or copy this
>>> communication. Please notify the sender immediately if you have
>>> received this communication by mistake and delete or destroy this
>>> communication. Communications cannot be guaranteed to be secured or
>>> error-free as information could be intercepted, corrupted, lost,
>>> destroyed, arrive late or incomplete, or contain viruses. The sender
>>> therefore does not accept liability for any errors or omissions in
>>> the contents of this communication which arise as a result of
>>> transmission. If verification is required please request a hard-copy
>>> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
>>> FL 33912, http://www.neogenomics.com (2022)
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org This
>> communication and its attachments contain confidential information and
>> is intended only for the named addressee. If you are not the named
>> addressee you should not disseminate, distribute or copy this
>> communication. Please notify the sender immediately if you have
>> received this communication by mistake and delete or destroy this
>> communication. Communications cannot be guaranteed to be secured or
>> error-free as information could be intercepted, corrupted, lost,
>> destroyed, arrive late or incomplete, or contain viruses. The sender
>> therefore does not accept liability for any errors or omissions in the
>> contents of this communication which arise as a result of
>> transmission. If verification is required please request a hard-copy
>> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
>> FL 33912, http://www.neogenomics.com (2022)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> This communication and its attachments contain confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this communication. Please notify the sender immediately if you have received this communication by mistake and delete or destroy this communication. Communications cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this communication which arise as a result of transmission. If verification is required please request a hard-copy version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers, FL 33912, http://www.neogenomics.com (2022)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [EXTERNAL] Re: Connection pool

Posted by Mohamed Eliyas Abdul Kadar <mo...@neogenomics.com>.
Thank you for your response. But I have a question.

I need manager app to deploy the application, is there a way that can be avoided. As you mentioned I have an application with 20 connections and with manager app it comes back as 40 connections on the db side.

-----Original Message-----
From: Mark Thomas <ma...@apache.org>
Sent: Monday, May 9, 2022 8:47 AM
To: users@tomcat.apache.org
Subject: Re: [EXTERNAL] Re: Connection pool

CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.

On 09/05/2022 16:42, Mohamed Eliyas Abdul Kadar wrote:
> Does that mean manager app deployed on the tomcat will also influence creating of connection pools. Manager does not have ang datasource, even then will it induce connection pool.

Yes.

If you define the resource in CATALINA_BASE/conf/context.xml you get one instance of the resource for every web application deployed.

Mark


>
> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Thursday, May 5, 2022 10:00 AM
> To: users@tomcat.apache.org
> Subject: Re: [EXTERNAL] Re: Connection pool
>
> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>
> On 05/05/2022 17:51, Mohamed Eliyas Abdul Kadar wrote:
>>
>> C:\apache-tomcat-9.0.45\conf which is CATALINA_BASE\conf
>
> The contents of the context.xml file placed in that located is inherited by every web application deployed to Tomcat. So, if you have three web applications deployed you will get three instances of your connection pool each with a maximum of 20 connections. That means your database server may see up to 60 connections.
>
> If you want one pool of 20 connections shared between all the deployed
> web applications then you need to define that pool as a global
> resource in server.xml and then use a ResourceLink in
> CATALINA_BASE/conf/context.xml
>
> Alternatively, you can define individual pools in each of the web application's individual context.xml file (META-INF/context.xml).
>
> Mark
>
>
>> -----Original Message-----
>> From: Mark Thomas <ma...@apache.org>
>> Sent: Thursday, May 5, 2022 8:43 AM
>> To: users@tomcat.apache.org
>> Subject: Re: [EXTERNAL] Re: Connection pool
>>
>> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>>
>> On 05/05/2022 16:39, Mohamed Eliyas Abdul Kadar wrote:
>>> This file is from context.xml for the datasource.
>>
>> Repeating my previous question:
>>
>> What is the full path to this context.xml file relative to CATALINA_BASE?
>>
>> Mark
>>
>>
>>>
>>> C:\apache-tomcat-9.0.45\bin>startup.bat
>>> Using CATALINA_BASE:   "C:\apache-tomcat-9.0.45"
>>> Using CATALINA_HOME:   "C:\apache-tomcat-9.0.45"
>>> Using CATALINA_TMPDIR: "C:\apache-tomcat-9.0.45\temp"
>>> Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_281"
>>> Using CLASSPATH:       "C:\apache-tomcat-9.0.45\bin\bootstrap.jar;C:\apache-tomcat-9.0.45\bin\tomcat-juli.jar"
>>> Using CATALINA_OPTS:   ""
>>>
>>> -----Original Message-----
>>> From: Mark Thomas <ma...@apache.org>
>>> Sent: Wednesday, May 4, 2022 11:38 PM
>>> To: users@tomcat.apache.org
>>> Subject: [EXTERNAL] Re: Connection pool
>>>
>>> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>>>
>>> On 04/05/2022 22:29, Mohamed Eliyas Abdul Kadar wrote:
>>>> Hi All
>>>> I am trying to limit the db connections on the oracle side by limiting the size of connection pool in the datasource config as below. I tried setting the max size to 20 by maxTotal/ maxActive either of them didn't work. The db side connection was always more than 30. Please advise.
>>>>
>>>>
>>>> <Resource name="jdbc/portal" auth="Container" type="javax.sql.DataSource"
>>>>      initialSize="10" maxTotal="10"  maxIdle="10"  maxWaitMillis="10000"
>>>> username="PORTAL" password="cde"
>>>> driverClassName="oracle.jdbc.driver.OracleDriver"
>>>> url="jdbc:oracle:thin:@cde" factory="SecureDataSource"/>
>>>
>>> Which file is the above configuration snippet taken from? Full path relative to CATALINA_BASE please.
>>>
>>> Mark
>>>
>>> --------------------------------------------------------------------
>>> - To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org This
>>> communication and its attachments contain confidential information
>>> and is intended only for the named addressee. If you are not the
>>> named addressee you should not disseminate, distribute or copy this
>>> communication. Please notify the sender immediately if you have
>>> received this communication by mistake and delete or destroy this
>>> communication. Communications cannot be guaranteed to be secured or
>>> error-free as information could be intercepted, corrupted, lost,
>>> destroyed, arrive late or incomplete, or contain viruses. The sender
>>> therefore does not accept liability for any errors or omissions in
>>> the contents of this communication which arise as a result of
>>> transmission. If verification is required please request a hard-copy
>>> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
>>> FL 33912, http://www.neogenomics.com (2022)
>>>
>>> --------------------------------------------------------------------
>>> - To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org This
>> communication and its attachments contain confidential information
>> and is intended only for the named addressee. If you are not the
>> named addressee you should not disseminate, distribute or copy this
>> communication. Please notify the sender immediately if you have
>> received this communication by mistake and delete or destroy this
>> communication. Communications cannot be guaranteed to be secured or
>> error-free as information could be intercepted, corrupted, lost,
>> destroyed, arrive late or incomplete, or contain viruses. The sender
>> therefore does not accept liability for any errors or omissions in
>> the contents of this communication which arise as a result of
>> transmission. If verification is required please request a hard-copy
>> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
>> FL 33912, http://www.neogenomics.com (2022)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org This
> communication and its attachments contain confidential information and
> is intended only for the named addressee. If you are not the named
> addressee you should not disseminate, distribute or copy this
> communication. Please notify the sender immediately if you have
> received this communication by mistake and delete or destroy this
> communication. Communications cannot be guaranteed to be secured or
> error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this communication which arise as a result of
> transmission. If verification is required please request a hard-copy
> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
> FL 33912, http://www.neogenomics.com (2022)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
This communication and its attachments contain confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this communication. Please notify the sender immediately if you have received this communication by mistake and delete or destroy this communication. Communications cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this communication which arise as a result of transmission. If verification is required please request a hard-copy version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers, FL 33912, http://www.neogenomics.com (2022)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [EXTERNAL] Re: Connection pool

Posted by Mark Thomas <ma...@apache.org>.
On 09/05/2022 16:42, Mohamed Eliyas Abdul Kadar wrote:
> Does that mean manager app deployed on the tomcat will also influence creating of connection pools. Manager does not have ang datasource, even then will it induce connection pool.

Yes.

If you define the resource in CATALINA_BASE/conf/context.xml you get one 
instance of the resource for every web application deployed.

Mark


> 
> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Thursday, May 5, 2022 10:00 AM
> To: users@tomcat.apache.org
> Subject: Re: [EXTERNAL] Re: Connection pool
> 
> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
> 
> On 05/05/2022 17:51, Mohamed Eliyas Abdul Kadar wrote:
>>
>> C:\apache-tomcat-9.0.45\conf which is CATALINA_BASE\conf
> 
> The contents of the context.xml file placed in that located is inherited by every web application deployed to Tomcat. So, if you have three web applications deployed you will get three instances of your connection pool each with a maximum of 20 connections. That means your database server may see up to 60 connections.
> 
> If you want one pool of 20 connections shared between all the deployed web applications then you need to define that pool as a global resource in server.xml and then use a ResourceLink in CATALINA_BASE/conf/context.xml
> 
> Alternatively, you can define individual pools in each of the web application's individual context.xml file (META-INF/context.xml).
> 
> Mark
> 
> 
>> -----Original Message-----
>> From: Mark Thomas <ma...@apache.org>
>> Sent: Thursday, May 5, 2022 8:43 AM
>> To: users@tomcat.apache.org
>> Subject: Re: [EXTERNAL] Re: Connection pool
>>
>> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>>
>> On 05/05/2022 16:39, Mohamed Eliyas Abdul Kadar wrote:
>>> This file is from context.xml for the datasource.
>>
>> Repeating my previous question:
>>
>> What is the full path to this context.xml file relative to CATALINA_BASE?
>>
>> Mark
>>
>>
>>>
>>> C:\apache-tomcat-9.0.45\bin>startup.bat
>>> Using CATALINA_BASE:   "C:\apache-tomcat-9.0.45"
>>> Using CATALINA_HOME:   "C:\apache-tomcat-9.0.45"
>>> Using CATALINA_TMPDIR: "C:\apache-tomcat-9.0.45\temp"
>>> Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_281"
>>> Using CLASSPATH:       "C:\apache-tomcat-9.0.45\bin\bootstrap.jar;C:\apache-tomcat-9.0.45\bin\tomcat-juli.jar"
>>> Using CATALINA_OPTS:   ""
>>>
>>> -----Original Message-----
>>> From: Mark Thomas <ma...@apache.org>
>>> Sent: Wednesday, May 4, 2022 11:38 PM
>>> To: users@tomcat.apache.org
>>> Subject: [EXTERNAL] Re: Connection pool
>>>
>>> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>>>
>>> On 04/05/2022 22:29, Mohamed Eliyas Abdul Kadar wrote:
>>>> Hi All
>>>> I am trying to limit the db connections on the oracle side by limiting the size of connection pool in the datasource config as below. I tried setting the max size to 20 by maxTotal/ maxActive either of them didn't work. The db side connection was always more than 30. Please advise.
>>>>
>>>>
>>>> <Resource name="jdbc/portal" auth="Container" type="javax.sql.DataSource"
>>>>      initialSize="10" maxTotal="10"  maxIdle="10"  maxWaitMillis="10000"
>>>> username="PORTAL" password="cde"
>>>> driverClassName="oracle.jdbc.driver.OracleDriver"
>>>> url="jdbc:oracle:thin:@cde" factory="SecureDataSource"/>
>>>
>>> Which file is the above configuration snippet taken from? Full path relative to CATALINA_BASE please.
>>>
>>> Mark
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org This
>>> communication and its attachments contain confidential information
>>> and is intended only for the named addressee. If you are not the
>>> named addressee you should not disseminate, distribute or copy this
>>> communication. Please notify the sender immediately if you have
>>> received this communication by mistake and delete or destroy this
>>> communication. Communications cannot be guaranteed to be secured or
>>> error-free as information could be intercepted, corrupted, lost,
>>> destroyed, arrive late or incomplete, or contain viruses. The sender
>>> therefore does not accept liability for any errors or omissions in
>>> the contents of this communication which arise as a result of
>>> transmission. If verification is required please request a hard-copy
>>> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
>>> FL 33912, http://www.neogenomics.com (2022)
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>>> For additional commands, e-mail: users-help@tomcat.apache.org
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org This
>> communication and its attachments contain confidential information and
>> is intended only for the named addressee. If you are not the named
>> addressee you should not disseminate, distribute or copy this
>> communication. Please notify the sender immediately if you have
>> received this communication by mistake and delete or destroy this
>> communication. Communications cannot be guaranteed to be secured or
>> error-free as information could be intercepted, corrupted, lost,
>> destroyed, arrive late or incomplete, or contain viruses. The sender
>> therefore does not accept liability for any errors or omissions in the
>> contents of this communication which arise as a result of
>> transmission. If verification is required please request a hard-copy
>> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
>> FL 33912, http://www.neogenomics.com (2022)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> This communication and its attachments contain confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this communication. Please notify the sender immediately if you have received this communication by mistake and delete or destroy this communication. Communications cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this communication which arise as a result of transmission. If verification is required please request a hard-copy version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers, FL 33912, http://www.neogenomics.com (2022)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [EXTERNAL] Re: Connection pool

Posted by Mohamed Eliyas Abdul Kadar <mo...@neogenomics.com>.
Does that mean manager app deployed on the tomcat will also influence creating of connection pools. Manager does not have ang datasource, even then will it induce connection pool.

-----Original Message-----
From: Mark Thomas <ma...@apache.org>
Sent: Thursday, May 5, 2022 10:00 AM
To: users@tomcat.apache.org
Subject: Re: [EXTERNAL] Re: Connection pool

CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.

On 05/05/2022 17:51, Mohamed Eliyas Abdul Kadar wrote:
>
> C:\apache-tomcat-9.0.45\conf which is CATALINA_BASE\conf

The contents of the context.xml file placed in that located is inherited by every web application deployed to Tomcat. So, if you have three web applications deployed you will get three instances of your connection pool each with a maximum of 20 connections. That means your database server may see up to 60 connections.

If you want one pool of 20 connections shared between all the deployed web applications then you need to define that pool as a global resource in server.xml and then use a ResourceLink in CATALINA_BASE/conf/context.xml

Alternatively, you can define individual pools in each of the web application's individual context.xml file (META-INF/context.xml).

Mark


> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Thursday, May 5, 2022 8:43 AM
> To: users@tomcat.apache.org
> Subject: Re: [EXTERNAL] Re: Connection pool
>
> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>
> On 05/05/2022 16:39, Mohamed Eliyas Abdul Kadar wrote:
>> This file is from context.xml for the datasource.
>
> Repeating my previous question:
>
> What is the full path to this context.xml file relative to CATALINA_BASE?
>
> Mark
>
>
>>
>> C:\apache-tomcat-9.0.45\bin>startup.bat
>> Using CATALINA_BASE:   "C:\apache-tomcat-9.0.45"
>> Using CATALINA_HOME:   "C:\apache-tomcat-9.0.45"
>> Using CATALINA_TMPDIR: "C:\apache-tomcat-9.0.45\temp"
>> Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_281"
>> Using CLASSPATH:       "C:\apache-tomcat-9.0.45\bin\bootstrap.jar;C:\apache-tomcat-9.0.45\bin\tomcat-juli.jar"
>> Using CATALINA_OPTS:   ""
>>
>> -----Original Message-----
>> From: Mark Thomas <ma...@apache.org>
>> Sent: Wednesday, May 4, 2022 11:38 PM
>> To: users@tomcat.apache.org
>> Subject: [EXTERNAL] Re: Connection pool
>>
>> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>>
>> On 04/05/2022 22:29, Mohamed Eliyas Abdul Kadar wrote:
>>> Hi All
>>> I am trying to limit the db connections on the oracle side by limiting the size of connection pool in the datasource config as below. I tried setting the max size to 20 by maxTotal/ maxActive either of them didn't work. The db side connection was always more than 30. Please advise.
>>>
>>>
>>> <Resource name="jdbc/portal" auth="Container" type="javax.sql.DataSource"
>>>     initialSize="10" maxTotal="10"  maxIdle="10"  maxWaitMillis="10000"
>>> username="PORTAL" password="cde"
>>> driverClassName="oracle.jdbc.driver.OracleDriver"
>>> url="jdbc:oracle:thin:@cde" factory="SecureDataSource"/>
>>
>> Which file is the above configuration snippet taken from? Full path relative to CATALINA_BASE please.
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org This
>> communication and its attachments contain confidential information
>> and is intended only for the named addressee. If you are not the
>> named addressee you should not disseminate, distribute or copy this
>> communication. Please notify the sender immediately if you have
>> received this communication by mistake and delete or destroy this
>> communication. Communications cannot be guaranteed to be secured or
>> error-free as information could be intercepted, corrupted, lost,
>> destroyed, arrive late or incomplete, or contain viruses. The sender
>> therefore does not accept liability for any errors or omissions in
>> the contents of this communication which arise as a result of
>> transmission. If verification is required please request a hard-copy
>> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
>> FL 33912, http://www.neogenomics.com (2022)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org This
> communication and its attachments contain confidential information and
> is intended only for the named addressee. If you are not the named
> addressee you should not disseminate, distribute or copy this
> communication. Please notify the sender immediately if you have
> received this communication by mistake and delete or destroy this
> communication. Communications cannot be guaranteed to be secured or
> error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this communication which arise as a result of
> transmission. If verification is required please request a hard-copy
> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
> FL 33912, http://www.neogenomics.com (2022)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
This communication and its attachments contain confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this communication. Please notify the sender immediately if you have received this communication by mistake and delete or destroy this communication. Communications cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this communication which arise as a result of transmission. If verification is required please request a hard-copy version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers, FL 33912, http://www.neogenomics.com (2022)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: [EXTERNAL] Re: Connection pool

Posted by Mark Thomas <ma...@apache.org>.
On 05/05/2022 17:51, Mohamed Eliyas Abdul Kadar wrote:
> 
> C:\apache-tomcat-9.0.45\conf which is CATALINA_BASE\conf

The contents of the context.xml file placed in that located is inherited 
by every web application deployed to Tomcat. So, if you have three web 
applications deployed you will get three instances of your connection 
pool each with a maximum of 20 connections. That means your database 
server may see up to 60 connections.

If you want one pool of 20 connections shared between all the deployed 
web applications then you need to define that pool as a global resource 
in server.xml and then use a ResourceLink in CATALINA_BASE/conf/context.xml

Alternatively, you can define individual pools in each of the web 
application's individual context.xml file (META-INF/context.xml).

Mark


> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Thursday, May 5, 2022 8:43 AM
> To: users@tomcat.apache.org
> Subject: Re: [EXTERNAL] Re: Connection pool
> 
> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
> 
> On 05/05/2022 16:39, Mohamed Eliyas Abdul Kadar wrote:
>> This file is from context.xml for the datasource.
> 
> Repeating my previous question:
> 
> What is the full path to this context.xml file relative to CATALINA_BASE?
> 
> Mark
> 
> 
>>
>> C:\apache-tomcat-9.0.45\bin>startup.bat
>> Using CATALINA_BASE:   "C:\apache-tomcat-9.0.45"
>> Using CATALINA_HOME:   "C:\apache-tomcat-9.0.45"
>> Using CATALINA_TMPDIR: "C:\apache-tomcat-9.0.45\temp"
>> Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_281"
>> Using CLASSPATH:       "C:\apache-tomcat-9.0.45\bin\bootstrap.jar;C:\apache-tomcat-9.0.45\bin\tomcat-juli.jar"
>> Using CATALINA_OPTS:   ""
>>
>> -----Original Message-----
>> From: Mark Thomas <ma...@apache.org>
>> Sent: Wednesday, May 4, 2022 11:38 PM
>> To: users@tomcat.apache.org
>> Subject: [EXTERNAL] Re: Connection pool
>>
>> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>>
>> On 04/05/2022 22:29, Mohamed Eliyas Abdul Kadar wrote:
>>> Hi All
>>> I am trying to limit the db connections on the oracle side by limiting the size of connection pool in the datasource config as below. I tried setting the max size to 20 by maxTotal/ maxActive either of them didn't work. The db side connection was always more than 30. Please advise.
>>>
>>>
>>> <Resource name="jdbc/portal" auth="Container" type="javax.sql.DataSource"
>>>     initialSize="10" maxTotal="10"  maxIdle="10"  maxWaitMillis="10000"
>>> username="PORTAL" password="cde"
>>> driverClassName="oracle.jdbc.driver.OracleDriver"
>>> url="jdbc:oracle:thin:@cde" factory="SecureDataSource"/>
>>
>> Which file is the above configuration snippet taken from? Full path relative to CATALINA_BASE please.
>>
>> Mark
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org This
>> communication and its attachments contain confidential information and
>> is intended only for the named addressee. If you are not the named
>> addressee you should not disseminate, distribute or copy this
>> communication. Please notify the sender immediately if you have
>> received this communication by mistake and delete or destroy this
>> communication. Communications cannot be guaranteed to be secured or
>> error-free as information could be intercepted, corrupted, lost,
>> destroyed, arrive late or incomplete, or contain viruses. The sender
>> therefore does not accept liability for any errors or omissions in the
>> contents of this communication which arise as a result of
>> transmission. If verification is required please request a hard-copy
>> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
>> FL 33912, http://www.neogenomics.com (2022)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> This communication and its attachments contain confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this communication. Please notify the sender immediately if you have received this communication by mistake and delete or destroy this communication. Communications cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this communication which arise as a result of transmission. If verification is required please request a hard-copy version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers, FL 33912, http://www.neogenomics.com (2022)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [EXTERNAL] Re: Connection pool

Posted by Mohamed Eliyas Abdul Kadar <mo...@neogenomics.com>.
C:\apache-tomcat-9.0.45\conf which is CATALINA_BASE\conf


-----Original Message-----
From: Mark Thomas <ma...@apache.org>
Sent: Thursday, May 5, 2022 8:43 AM
To: users@tomcat.apache.org
Subject: Re: [EXTERNAL] Re: Connection pool

CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.

On 05/05/2022 16:39, Mohamed Eliyas Abdul Kadar wrote:
> This file is from context.xml for the datasource.

Repeating my previous question:

What is the full path to this context.xml file relative to CATALINA_BASE?

Mark


>
> C:\apache-tomcat-9.0.45\bin>startup.bat
> Using CATALINA_BASE:   "C:\apache-tomcat-9.0.45"
> Using CATALINA_HOME:   "C:\apache-tomcat-9.0.45"
> Using CATALINA_TMPDIR: "C:\apache-tomcat-9.0.45\temp"
> Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_281"
> Using CLASSPATH:       "C:\apache-tomcat-9.0.45\bin\bootstrap.jar;C:\apache-tomcat-9.0.45\bin\tomcat-juli.jar"
> Using CATALINA_OPTS:   ""
>
> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Wednesday, May 4, 2022 11:38 PM
> To: users@tomcat.apache.org
> Subject: [EXTERNAL] Re: Connection pool
>
> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
>
> On 04/05/2022 22:29, Mohamed Eliyas Abdul Kadar wrote:
>> Hi All
>> I am trying to limit the db connections on the oracle side by limiting the size of connection pool in the datasource config as below. I tried setting the max size to 20 by maxTotal/ maxActive either of them didn't work. The db side connection was always more than 30. Please advise.
>>
>>
>> <Resource name="jdbc/portal" auth="Container" type="javax.sql.DataSource"
>>    initialSize="10" maxTotal="10"  maxIdle="10"  maxWaitMillis="10000"
>> username="PORTAL" password="cde"
>> driverClassName="oracle.jdbc.driver.OracleDriver"
>> url="jdbc:oracle:thin:@cde" factory="SecureDataSource"/>
>
> Which file is the above configuration snippet taken from? Full path relative to CATALINA_BASE please.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org This
> communication and its attachments contain confidential information and
> is intended only for the named addressee. If you are not the named
> addressee you should not disseminate, distribute or copy this
> communication. Please notify the sender immediately if you have
> received this communication by mistake and delete or destroy this
> communication. Communications cannot be guaranteed to be secured or
> error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this communication which arise as a result of
> transmission. If verification is required please request a hard-copy
> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
> FL 33912, http://www.neogenomics.com (2022)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
This communication and its attachments contain confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this communication. Please notify the sender immediately if you have received this communication by mistake and delete or destroy this communication. Communications cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this communication which arise as a result of transmission. If verification is required please request a hard-copy version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers, FL 33912, http://www.neogenomics.com (2022)

Re: [EXTERNAL] Re: Connection pool

Posted by Mark Thomas <ma...@apache.org>.
On 05/05/2022 16:39, Mohamed Eliyas Abdul Kadar wrote:
> This file is from context.xml for the datasource.

Repeating my previous question:

What is the full path to this context.xml file relative to CATALINA_BASE?

Mark


> 
> C:\apache-tomcat-9.0.45\bin>startup.bat
> Using CATALINA_BASE:   "C:\apache-tomcat-9.0.45"
> Using CATALINA_HOME:   "C:\apache-tomcat-9.0.45"
> Using CATALINA_TMPDIR: "C:\apache-tomcat-9.0.45\temp"
> Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_281"
> Using CLASSPATH:       "C:\apache-tomcat-9.0.45\bin\bootstrap.jar;C:\apache-tomcat-9.0.45\bin\tomcat-juli.jar"
> Using CATALINA_OPTS:   ""
> 
> -----Original Message-----
> From: Mark Thomas <ma...@apache.org>
> Sent: Wednesday, May 4, 2022 11:38 PM
> To: users@tomcat.apache.org
> Subject: [EXTERNAL] Re: Connection pool
> 
> CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.
> 
> On 04/05/2022 22:29, Mohamed Eliyas Abdul Kadar wrote:
>> Hi All
>> I am trying to limit the db connections on the oracle side by limiting the size of connection pool in the datasource config as below. I tried setting the max size to 20 by maxTotal/ maxActive either of them didn't work. The db side connection was always more than 30. Please advise.
>>
>>
>> <Resource name="jdbc/portal" auth="Container" type="javax.sql.DataSource"
>>    initialSize="10" maxTotal="10"  maxIdle="10"  maxWaitMillis="10000"
>> username="PORTAL" password="cde"
>> driverClassName="oracle.jdbc.driver.OracleDriver"
>> url="jdbc:oracle:thin:@cde" factory="SecureDataSource"/>
> 
> Which file is the above configuration snippet taken from? Full path relative to CATALINA_BASE please.
> 
> Mark
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> This communication and its attachments contain confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this communication. Please notify the sender immediately if you have received this communication by mistake and delete or destroy this communication. Communications cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this communication which arise as a result of transmission. If verification is required please request a hard-copy version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers, FL 33912, http://www.neogenomics.com (2022)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [EXTERNAL] Re: Connection pool

Posted by Mohamed Eliyas Abdul Kadar <mo...@neogenomics.com>.
This file is from context.xml for the datasource.

C:\apache-tomcat-9.0.45\bin>startup.bat
Using CATALINA_BASE:   "C:\apache-tomcat-9.0.45"
Using CATALINA_HOME:   "C:\apache-tomcat-9.0.45"
Using CATALINA_TMPDIR: "C:\apache-tomcat-9.0.45\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_281"
Using CLASSPATH:       "C:\apache-tomcat-9.0.45\bin\bootstrap.jar;C:\apache-tomcat-9.0.45\bin\tomcat-juli.jar"
Using CATALINA_OPTS:   ""

-----Original Message-----
From: Mark Thomas <ma...@apache.org>
Sent: Wednesday, May 4, 2022 11:38 PM
To: users@tomcat.apache.org
Subject: [EXTERNAL] Re: Connection pool

CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.

On 04/05/2022 22:29, Mohamed Eliyas Abdul Kadar wrote:
> Hi All
> I am trying to limit the db connections on the oracle side by limiting the size of connection pool in the datasource config as below. I tried setting the max size to 20 by maxTotal/ maxActive either of them didn't work. The db side connection was always more than 30. Please advise.
>
>
> <Resource name="jdbc/portal" auth="Container" type="javax.sql.DataSource"
>   initialSize="10" maxTotal="10"  maxIdle="10"  maxWaitMillis="10000"
> username="PORTAL" password="cde"
> driverClassName="oracle.jdbc.driver.OracleDriver"
> url="jdbc:oracle:thin:@cde" factory="SecureDataSource"/>

Which file is the above configuration snippet taken from? Full path relative to CATALINA_BASE please.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
This communication and its attachments contain confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this communication. Please notify the sender immediately if you have received this communication by mistake and delete or destroy this communication. Communications cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this communication which arise as a result of transmission. If verification is required please request a hard-copy version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers, FL 33912, http://www.neogenomics.com (2022)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Connection pool

Posted by Mark Thomas <ma...@apache.org>.
On 04/05/2022 22:29, Mohamed Eliyas Abdul Kadar wrote:
> Hi All
> I am trying to limit the db connections on the oracle side by limiting the size of connection pool in the datasource config as below. I tried setting the max size to 20 by maxTotal/ maxActive either of them didn't work. The db side connection was always more than 30. Please advise.
> 
> 
> <Resource name="jdbc/portal" auth="Container" type="javax.sql.DataSource"
>   initialSize="10" maxTotal="10"  maxIdle="10"  maxWaitMillis="10000"
> username="PORTAL" password="cde"
> driverClassName="oracle.jdbc.driver.OracleDriver"
> url="jdbc:oracle:thin:@cde" factory="SecureDataSource"/>

Which file is the above configuration snippet taken from? Full path 
relative to CATALINA_BASE please.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: [EXTERNAL] Re: Connection pool

Posted by Mohamed Eliyas Abdul Kadar <mo...@neogenomics.com>.
Hi Suvendu
Thanks for responding, we are using only one instance of tomcat. The connections still exceed the MaxTotal / max Active value mentioned in the datasource config.



-----Original Message-----
From: Suvendu Sekhar Mondal <su...@gmail.com>
Sent: Wednesday, May 4, 2022 10:27 PM
To: Tomcat Users List <us...@tomcat.apache.org>
Subject: [EXTERNAL] Re: Connection pool

CAUTION: This email originated from outside the organization. DO NOT click links or open attachments unless you recognize the sender and know the content is safe.

Hello Mohamed,

On Thu, May 5, 2022 at 2:59 AM Mohamed Eliyas Abdul Kadar <mo...@neogenomics.com> wrote:
>
> Hi All
> I am trying to limit the db connections on the oracle side by limiting the size of connection pool in the datasource config as below. I tried setting the max size to 20 by maxTotal/ maxActive either of them didn't work. The db side connection was always more than 30. Please advise.
>
>
> <Resource name="jdbc/portal" auth="Container" type="javax.sql.DataSource"
>  initialSize="10" maxTotal="10"  maxIdle="10"  maxWaitMillis="10000"
> username="PORTAL" password="cde"
> driverClassName="oracle.jdbc.driver.OracleDriver"
> url="jdbc:oracle:thin:@cde" factory="SecureDataSource"/>
>

Can you please check the source IP of the connections just to make sure they all originated from the server where you are running your Tomcat? By any chance are you running multiple instances of Tomcats?

Thanks & Regards,
Suvendu

> Regards
> Mohamed
> This communication and its attachments contain confidential
> information and is intended only for the named addressee. If you are
> not the named addressee you should not disseminate, distribute or copy
> this communication. Please notify the sender immediately if you have
> received this communication by mistake and delete or destroy this
> communication. Communications cannot be guaranteed to be secured or
> error-free as information could be intercepted, corrupted, lost,
> destroyed, arrive late or incomplete, or contain viruses. The sender
> therefore does not accept liability for any errors or omissions in the
> contents of this communication which arise as a result of
> transmission. If verification is required please request a hard-copy
> version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers,
> FL 33912, http://www.neogenomics.com (2022)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
This communication and its attachments contain confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this communication. Please notify the sender immediately if you have received this communication by mistake and delete or destroy this communication. Communications cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this communication which arise as a result of transmission. If verification is required please request a hard-copy version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers, FL 33912, http://www.neogenomics.com (2022)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Connection pool

Posted by Suvendu Sekhar Mondal <su...@gmail.com>.
Hello Mohamed,

On Thu, May 5, 2022 at 2:59 AM Mohamed Eliyas Abdul Kadar
<mo...@neogenomics.com> wrote:
>
> Hi All
> I am trying to limit the db connections on the oracle side by limiting the size of connection pool in the datasource config as below. I tried setting the max size to 20 by maxTotal/ maxActive either of them didn't work. The db side connection was always more than 30. Please advise.
>
>
> <Resource name="jdbc/portal" auth="Container" type="javax.sql.DataSource"
>  initialSize="10" maxTotal="10"  maxIdle="10"  maxWaitMillis="10000"
> username="PORTAL" password="cde"
> driverClassName="oracle.jdbc.driver.OracleDriver"
> url="jdbc:oracle:thin:@cde" factory="SecureDataSource"/>
>

Can you please check the source IP of the connections just to make
sure they all originated from the server where you are running your
Tomcat? By any chance are you running multiple instances of Tomcats?

Thanks & Regards,
Suvendu

> Regards
> Mohamed
> This communication and its attachments contain confidential information and is intended only for the named addressee. If you are not the named addressee you should not disseminate, distribute or copy this communication. Please notify the sender immediately if you have received this communication by mistake and delete or destroy this communication. Communications cannot be guaranteed to be secured or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this communication which arise as a result of transmission. If verification is required please request a hard-copy version. NeoGenomics Laboratories, 9490 NeoGenomics Way, Fort Myers, FL 33912, http://www.neogenomics.com (2022)

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org