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 -r1.78.2.14 -r1.78.2.15 --- openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 29 Apr 2016 07:12:03 -0000 1.78.2.14 +++ openacs-4/packages/xotcl-core/tcl/01-debug-procs.tcl 16 Aug 2016 18:06:43 -0000 1.78.2.15 @@ -535,6 +535,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 #