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.41 -r1.67.2.42 --- openacs-4/packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl 20 Apr 2021 09:37:11 -0000 1.67.2.41 +++ openacs-4/packages/xotcl-request-monitor/tcl/throttle_mod-procs.tcl 22 Apr 2021 12:37:01 -0000 1.67.2.42 @@ -1698,11 +1698,17 @@ # :log "--t [info exists :context_initialized] url=[ns_conn url]" if {[info exists :context_initialized]} return - set url [string trimright [ns_conn url] "/"] - if {$url eq ""} { - set url "/" + # + # In case, the connection got terminated due to e.g. invalid URLs + # earlier, fall back to URL "/" to avoid hard DB errors resulting + # from the sitemap lookup of the URL. + # + if {[ns_conn isconnected]} { + set :url [ns_conn url] + ns_log notice "URL <${:url}> invalid? [regexp {[^[:print:]]} ${:url}]" + } else { + set :url / } - set :url $url set :method [ns_conn method] set :community_id 0