| Logging Configuration | Cluster Configuration |
Data base configuration is done in the conf/Catalina/localhost/ROOT.xml file. Only one of the database definition section must be uncommented at a time. In the url parameter, the correct server name, port number, and instance or database name must be specified to matched the installed database. The parameters for username and password must also be defined.
Your database performance is vital to dotCMS especially on the backend. There are of course many ways to tweak your database depending on what database you are running. In the conf/Catalina/localhost/ROOT.xml file you can tweak dotCMS's connections to your database. This is where you can configure the number of connections dotCMS will maintain in its pool. A pool of connections is kind of like a holding tank of connections. Every time dotCMS needs a connection it goes to its pool and gets one and then returns it when it is done. If there are no connections for it to get then it must wait.
Below is an example configuration for Postgres
<!-- POSTGRESQL --> <Resource name="jdbc/dotCMSPool" auth="Container" type="javax.sql.DataSource" driverClassName="org.postgresql.Driver" url="jdbc:postgresql://localhost/dotcms" username="postgres" password="xxxxxx" maxActive="60" maxIdle="10" maxWait="60000" removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true" testOnBorrow="true" validationQuery="SELECT 1"/>
The maxactive attribute sets the total number of connections that the pool can have. If you have a large dotCMS site you will want to increase this number. When possible it is a good idea to keep this number close to your number of maxthreads configured on your connectors in the server.xml. This would guarantee a connection for every potential connected user.
It should be noted that dotCMS does cache aggressively and will attempt to limit database traffic especially on the front end of your site but still the database is an important part of your overall dotCMS system.
| Logging Configuration | Cluster Configuration |
Post a Comment