Forum OpenACS Q&A: "channel already exists in target" with bgdelivery

I've been using the xotcl/bgdelivery/ad_returnfile_backgound method described here and here, but on busy servers serving large files (that is progressive download videos) I'm getting this error after a while:

ERROR=transfer failed: channel already exists in target
while executing
"error ERROR=$errorMsg"
(procedure "returnfile" line 42)
::bgdelivery->returnfile
invoked from within
"bgdelivery returnfile -client_data $client_data $status_code $mime_type $filename"
(procedure "ad_returnfile_background" line 7)
invoked from within
"ad_returnfile_background 200 [ns_guesstype $full_filename] $full_filename"

I haven't been able to find a good, simple explanation for this -- my guess is that this starts happening when we've served about 600-800 videos in 20 minutes or something like that.

Does anyone have a nice reason for the error? And, even better, a good solution?

Thanks, Steffen

Hi!

I have got the same error in a busy server with many transfers.

Anyway to resolve it?

Regards,
Agustin

Collapse
Posted by Gustaf Neumann on
Dear Steffen and Jose,

I tracked this problem down last November, and it turned out to be a bug in Tcl:

http://sourceforge.net/tracker/index.php?func=detail&aid=2333466&group_id=10894&atid=110894

If you are using a recent version of Tcl 8.5 (e.g. 8.5.6 or 8.5.7), the problem is gone. If you are using tcl 8.4.*, you have to get tcl from the core-8-4-branch from sourceforge, or patch Tcl yourself and recompile

http://tcl.cvs.sourceforge.net/viewvc/tcl/tcl/generic/tclIO.c?r1=1.61.2.29&r2=1.61.2.30&pathrev=core-8-4-branch

best regards
-gustaf neumann