Usage Note 54664: Setting up logging for monitoring c3p0 use in SAS® Digital Marketing 6.x
In SAS Digital Marketing 6.x, you can set c3p0 properties to improve performance, as detailed in SAS Note 54663, "Recommended c3p0.properties values for improving performance and system stability in SAS® Digital Marketing."
To monitor usage and performance and to investigate issues, set up c3p0 logging, as explained in the following sections.
Enabling Logging on SAS® Digital Marketing Server
For SAS Digital Marketing 6.1_M1
- Locate the SAS Digital Marketing Server log4j configuration file on the SAS tier. You can find the location of this file in the -Dlog4j.configuration= parameter of the sem.conf file (which resides in SAS-configuration-directory\Lev1\Applications\SASCustomerIntelligence\SASDigitalMarketing\etc\). For example, the value for the Dlog4j.configuration= parameter in wrapper.java.additional.9=-Dlog4j.configuration="file:%SDM_RUNTIME_CONFIG%\log4j_rmi.xml" might equate to
D:\SAS\Config\Lev1\Applications\SASCustomerIntelligence\SASDigitalMarketing\etc\log4j_rmi.xml.
- Add the following code snippet to the log4j_rmi.xml file to enable logging. (Change the logging filename and location, as required.)
<appender class="org.apache.log4j.DailyRollingFileAppender" name="c3p0_FILE">
<param name="datePattern" value="'.'yyyy-MM-dd" />
<param name="append" value="true" />
<param name="file" value="D:/SAS/Config/Lev1/Applications/SASCustomerIntelligence/SASDigitalMarketing/logs/c3p0.log" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} [%-5p] %-40.40c - %m%n" />
</layout>
</appender>
<category additivity="false" name="com.mchange">
<priority value="DEBUG" />
<appender-ref ref="c3p0_FILE" />
</category>
Enabling c3p0 Logging on the SDM.WAR Server (for ebtool Commands)
- Ensure that the following line is in the c3p0.properties file, which is located in a directory path similar to D:\jboss-eap-5.2\jboss-as\server\SASServer6\deploy_sas\sas.DigitalMarketingWebStudio6.1.ear\sdm.war\WEB-INF\classes:
# Property sets the log4j as logging mechanism
com.mchange.v2.log.MLog=com.mchange.v2.log.log4j.Log4jMLog
- Locate the sdm.war log4j configuration file on the middle tier. The location for this file is a path similar to
D:\SAS\Config\Lev1\Web\Common\LogConfig\SASDigitalMarketingWebStudio-log4j.xml.
- Add the following code snippet to the SASDigitalmarketingWebStudio-log4j.xml file to enable logging.(Change the logging filename and location, as required.)
<appender class="org.apache.log4j.DailyRollingFileAppender" name="c3p0_FILE">
<param name="datePattern" value="'.'yyyy-MM-dd" />
<param name="append" value="true" />
<param name="file" value="D:/SAS/Config/Lev1/Web/Logs/c3p0_ebtool.log" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} [%-5p] %-40.40c - %m%n" />
</layout>
</appender>
<category additivity="false" name="com.mchange">
<priority value="DEBUG" />
<appender-ref ref="c3p0_FILE" />
</category>
Enabling c3p0 Logging on the BESS.WAR Server
- Ensure that the following line is in the c3p0.properties file, which is located in a directory path similar to D:\jboss-eap-5.2\jboss-as\server\SASServer7\deploy_sas\bess.ear\bess.war\WEB-INF\classes:
# Property sets the log4j as logging mechanism
com.mchange.v2.log.MLog=com.mchange.v2.log.log4j.Log4jMLog
-
Locate the bess.war log4j configuration file on the middle tier. The location for this file is a path similar to D:\SAS\Config\Lev1\Web\Common\LogConfig\SASDigitalMarketingWebReporting-log4j.xml.
- Add the following code snippet to the SASDigitalMarketingWebReporting-log4j.xml file to enable logging. (Change the logging filename and location, as required.)
<appender class="org.apache.log4j.DailyRollingFileAppender" name="c3p0_FILE">
<param name="datePattern" value="'.'yyyy-MM-dd" />
<param name="append" value="true" />
<param name="file" value="C:/SAS/Config/Lev1/Web/Logs/c3p0_bess.log" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} [%-5p] %-40.40c - %m%n" />
</layout>
</appender>
<category additivity="false" name="com.mchange">
<priority value="DEBUG" />
<appender-ref ref="c3p0_FILE" />
</category>
For SAS® Digital Marketing 6.3, 6.4 and 6.5:
Enabling c3p0 Logging on the SDM.WAR Server (for SAS® Marketing Server and ebtool Commands)
- Ensure that the following line is in the c3p0.properties file, which is located in a directory path similar to D:\opt\sasinside\Config\Lev1\Web\WebAppServer
\SASServer6_1\sas_webapps\sdm.war\WEB-INF\classes.
# Property sets the log4j as logging mechanism
com.mchange.v2.log.MLog=com.mchange.v2.log.log4j.Log4jMLog
- Locate the sdm.war log4j config file on the middle tier. The location for this file is a path similar to the following example: D:\opt\sasinside\Config\Lev1\Web\Common\LogConfig
\SASDigitalMarketingServer-log4j.xml.
- Add the following code snippet to the SASDigitalMarketingServer-log4j.xml file to enable logging. (Change the logging filename and location, as required.)
<appender class="org.apache.log4j.DailyRollingFileAppender" name="c3p0_FILE">
<param name="datePattern" value="'.'yyyy-MM-dd" />
<param name="append" value="true" />
<param name="file" value=" D:/opt/sasinside/Config/Lev1/Web/Logs/SASServer6_1/c3p0_sdm.log"/><layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} [%-5p] %-40.40c - %m%n" />
</layout>
</appender>
<category additivity="false" name="com.mchange">
<priority value="DEBUG" />
<appender-ref ref="c3p0_FILE" />
</category>
Enabling c3p0 Logging on the BESS.WAR Server
- Ensure that the following line is in the c3p0.properties file, which is located in a directory path similar to D:\opt\sasinside\Config\Lev1\Web\WebAppServer
\SASServer7_1\sas_webapps\bess.war\WEB-INF\classes:
# Property sets the log4j as logging mechanism
com.mchange.v2.log.MLog=com.mchange.v2.log.log4j.Log4jMLog
- Locate the bess.war log4j configuration file on the middle tier. The location for this file is a path similar to D:\opt\sasinside\Config\Lev1\Web\Common\LogConfig
\SASDigitalMarketingTracking-log4j.xml.
- Add the following code snippet to the SASDigitalMarketingTracking-log4j.xml file to enable logging. (Change the logging filename and location, as required.)
<appender class="org.apache.log4j.DailyRollingFileAppender" name="c3p0_FILE">
<param name="datePattern" value="'.'yyyy-MM-dd" />
<param name="append" value="true" />
<param name="file" value=" D:/opt/sasinside/Config/Lev1/Web/Logs/SASServer7_1/c3p0_bess.log" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} [%-5p] %-40.40c - %m%n" />
</layout>
</appender>
<category additivity="false" name="com.mchange">
<priority value="DEBUG" />
<appender-ref ref="c3p0_FILE" />
</category>
Final Step
After you complete the steps in the previous sections for your release of SAS Digital Marketing Server, you need to restart your system, including the bess servers if you have changed this logging, in order to activate the increased logging and to review the c3p0 log files.
In particular, you should review the c3p0 log files if you see the following error in the log files:
-- pool is already maxed out.
If you see this error or encounter performance issues, consider updating the c3p0.properties files as detailed in SAS Note 54663, "Recommended c3p0.properties values for improving performance and system stability in SAS® Digital Marketing."
Operating System and Release Information
| SAS System | SAS Digital Marketing | Microsoft® Windows® for x64 | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows 8 Enterprise 32-bit | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows 8 Enterprise x64 | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows 8 Pro 32-bit | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows 8 Pro x64 | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows 8.1 Enterprise 32-bit | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows 8.1 Enterprise x64 | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows 8.1 Pro | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows 8.1 Pro 32-bit | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows Server 2003 Datacenter Edition | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows Server 2003 Enterprise Edition | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows Server 2003 Standard Edition | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows Server 2003 for x64 | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows Server 2008 | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows Server 2008 R2 | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows Server 2008 for x64 | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows Server 2012 Datacenter | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows Server 2012 R2 Datacenter | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows Server 2012 R2 Std | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows Server 2012 Std | 6.1_M1 | | 9.3 TS1M2 | |
| Microsoft Windows XP Professional | 6.1_M1 | | 9.3 TS1M2 | |
| Windows 7 Enterprise 32 bit | 6.1_M1 | | 9.3 TS1M2 | |
| Windows 7 Enterprise x64 | 6.1_M1 | | 9.3 TS1M2 | |
| Windows 7 Home Premium 32 bit | 6.1_M1 | | 9.3 TS1M2 | |
| Windows 7 Home Premium x64 | 6.1_M1 | | 9.3 TS1M2 | |
| Windows 7 Professional 32 bit | 6.1_M1 | | 9.3 TS1M2 | |
| Windows 7 Professional x64 | 6.1_M1 | | 9.3 TS1M2 | |
| Windows 7 Ultimate 32 bit | 6.1_M1 | | 9.3 TS1M2 | |
| Windows 7 Ultimate x64 | 6.1_M1 | | 9.3 TS1M2 | |
| Windows Vista | 6.1_M1 | | 9.3 TS1M2 | |
| Windows Vista for x64 | 6.1_M1 | | 9.3 TS1M2 | |
| 64-bit Enabled AIX | 6.1_M1 | | 9.3 TS1M2 | |
| 64-bit Enabled HP-UX | 6.1_M1 | | 9.3 TS1M2 | |
| 64-bit Enabled Solaris | 6.1_M1 | | 9.3 TS1M2 | |
| HP-UX IPF | 6.1_M1 | | 9.3 TS1M2 | |
| Linux for x64 | 6.1_M1 | | 9.3 TS1M2 | |
| Solaris for x64 | 6.1_M1 | | 9.3 TS1M2 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Date Modified: | 2014-11-25 13:13:16 |
| Date Created: | 2014-11-19 07:06:54 |