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
- depends on
-
NXP-14845 Add a way to log slow NXQL queries
- Resolved