Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-19899

Add slow NXQL logging in DBS

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.10-HF18, 8.3
    • Component/s: Core

      Description

      As it was done by NXP-14845, we want to log the slow NXQL for DBS.

      To trace all NXQL queries that takes more than 100ms just add in the nuxeo.conf

      org.nuxeo.dbs.query.log_min_duration_ms=100
      

      And activate the log for org.nuxeo.ecm.core.storage.dbs at the INFO level.
      Here an example of lib/log4j.xml to get them in a separate file:

      <category name="org.nuxeo.ecm.core.storage.dbs.DBSSession" additivity="false">
          <priority value="INFO" />
          <appender-ref ref="SLOW" />
      </category>
      <appender name="SLOW" class="org.apache.log4j.FileAppender">
          <errorHandler class="org.apache.log4j.helpers.OnlyOnceErrorHandler" />
          <param name="File" value="${nuxeo.log.dir}/slow-query.log" />
          <param name="Append" value="false" />
          <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%d{ISO8601} %-5p [%t][%c] %m%X%n" />
          </layout>
      </appender>
      

      Documented : https://doc.nuxeo.com/display/NXDOC/Monitoring+Slow+NXQL+Queries

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 2 hours
                  2h