Index: openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl,v diff -u -N -r1.72.2.27 -r1.72.2.28 --- openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 15 Jul 2015 09:01:35 -0000 1.72.2.27 +++ openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 15 Dec 2018 18:07:48 -0000 1.72.2.28 @@ -576,6 +576,15 @@ # ns_log notice "ON DELETE $args" ::xo::broadcast clear + + # + # Make sure, no handles are allocated any more. Otherwise, when + # the thread is reused, there would be a conflict, when the thread + # has already a handle associated but tries to obtain an + # additional handle. + # + db_release_unused_handles + set t0 [clock clicks -milliseconds] ::xo::system_stats recordtimes #