Forum Moderators: phranque
I have Tomcat 5.5.25 and currently one subdomain sample_1 configured in server.xml.
<Host name="sample_1.mydomain.com" appBase="/home/myuser/public_html/extreme" unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Alias>www.sample_1.mydomain.com</Alias>
<Context path="" docBase="/home/myuser/public_html/sample_1" reloadable="true" crossContext="true">
<Resource name="jdbc/myDB" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="15" maxWait="15000"
validationQuery="select 1"
removeAbandoned="true"
removeAbandonedTimeout="50"
username="usernamehere" password="passwordhere"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/myuser_maindb?autoReconnect=true"/>
</Context>
<Context path="/manager" docBase="/usr/local/tomcat/users/myuser/tomcat/server/webapps/manager"
privileged="true" antiResourceLocking="false" antiJARLocking="false" reloadable="true" />
<Context path="/admin" docBase="/usr/local/tomcat/users/myuser/tomcat/server/webapps/admin"
privileged="true" antiResourceLocking="false" antiJARLocking="false" reloadable="true" />
</Host>
Now, I'd like to add another subdomain sample_2 with the same resource myDB. So basically I will copy the above and change a few things.
My question is about connections under resource, especially maxActive value. Do I keep 100 for two hosts or make it like 50/50? How Tomcat handles this between multiple webapps (in my case two subdomains)?
Thanks!