Index: openacs-4/packages/xotcl-request-monitor/xotcl-request-monitor.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/xotcl-request-monitor.info,v diff -u -r1.15.2.5 -r1.15.2.6 --- openacs-4/packages/xotcl-request-monitor/xotcl-request-monitor.info 6 Apr 2020 11:28:24 -0000 1.15.2.5 +++ openacs-4/packages/xotcl-request-monitor/xotcl-request-monitor.info 12 Apr 2020 12:42:02 -0000 1.15.2.6 @@ -16,7 +16,7 @@ <pre> This package provides a Request Monitor for OpenACS applications. It computes performance summary information such as requests/views per seconds, average response time, number - of users connected, lists currently active threads, etc. Furthermore it can block + of users connected, lists currently active threads, etc. Furthermore, it can block overactive users (e.g. automated web-bots mirroring the site, users repeating running queries, etc.). It provides as well some user tracking (such as whos-online) with activity measures, it blocks repeated requests (impatient reloads), tracks switching Index: openacs-4/packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl,v diff -u -r1.67.2.13 -r1.67.2.14 --- openacs-4/packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl 7 Apr 2020 07:14:03 -0000 1.67.2.13 +++ openacs-4/packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl 12 Apr 2020 12:42:03 -0000 1.67.2.14 @@ -389,13 +389,31 @@ #ns_log notice "conntime $conntime totaltime $totaltime url=<$url>" if { $url in {/register/ / /dotlrn/} } { # - # Calculate for certain URLs separate statistics + # Calculate for certain URLs separate statistics. These can be + # used via munin with the responsetime plugin, configured e.g. as # + # [naviserver_production_responsetime] + # env.urls / /register/ /dotlrn/ + # incr ::agg_time($url) $totaltime incr ::count(calls:$url) } - # + # NaviServer connection pool management: when we have a connection + # pool for slow requests, and the query took longer than 3 + # seconds, and the URL is not / or /dotlrn, then move this request + # to the "slow" pool. + # + if {[dict get $partialtimes runtime] > 3.0 + && [::acs::icanuse "ns_conn partialtimes"] + && "slow" in [ns_server pools] + && [ns_server mapped [list $method $url]] eq "" + && $url ni {/ /dotlrn/} + } { + ns_server -pool slow map -noinherit [list $method $url] + ns_log Notice "slow request: '$url' moved to slow connection pool" + } + # # Handling of longcalls counter # if {$conntime > 3000} {