Forum OpenACS Q&A: Little problem with background delivery

Hi,

I have installed AOLServer 4.5, applied the batch for background delivery and am using it on our production server. Currently all files are delivered using the background delivery. Before that we were using Aolserver 4.0 with background delivery as well. I both cases, even thou the file is delivered I get the below error. Any idea why this happens?

Greetings,
Nima

[03/Nov/2006:20:43:22][17146.3063696304][-conn:unima2::3] Error: GET http://dotlrn.uni-mannheim.de:443/dotlrn/file-storage/download/test.jpg?file%5fid=888852
referred by "https://dotlrn.uni-mannheim.de/dotlrn/file-storage/?folder_id=45364";
Success
while executing
"ns_conn channel"
(procedure "returnfile" line 6)
::bgdelivery->returnfile
invoked from within
"bgdelivery returnfile $statuscode $mime_type $filename"
(procedure "ad_returnfile_background" line 2)
invoked from within
"ad_returnfile_background 200 $mime_type $filename"
("file" arm line 18)
invoked from within
"switch $storage_type {
text {
set text [db_string write_text_content ""]
if { $string_p } {
return $te..."
(procedure "cr_write_content" line 29)
invoked from within
"cr_write_content -revision_id $version_id"
(file "/www/unima2/packages/file-storage/www/download/index.vuh" line 28)
invoked from within
"source [ad_conn file]"
(procedure "rp_handle_tcl_request" line 3)
invoked from within
"$handler"
("uplevel" body line 2)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
$handler
} ad_script_abort val {
# do nothing
}"
invoked from within
"rp_serve_concrete_file [ad_conn file]"
(procedure "rp_serve_abstract_file" line 60)
invoked from within
"rp_serve_abstract_file -noredirect -nodirectory -extension_pattern ".vuh" "$root$prefix""
("uplevel" body line 3)
invoked from within
"uplevel $code"
invoked from within
"ad_try {
ad_conn -set path_info [string range $path [expr [string length $prefix] - 1] end]
rp_serve_abstract_file -noredirect -nodirectory -e..."

Collapse
Posted by Victor Guerra on
Just for the record:

The only way I was able to reproduce this behavior is if you some how call more than one time ad_returnfile_background within a script. First time the file will be delivered as expected, because "ns_conn channel" will return a valid tcl channel. Second time the error you mentioned is raised.

The error could differ depending on which version of xotcl-core one is running. On recent versions, something like this will be raised:

Unknown error: 0
while executing
"ns_conn channel"
(procedure "returnfile" line 6)

I did check the index.vuh file under file-storage/www/download and i dont see how ad_returnfile_background would be called more than once. Probably at the time you wrote this post it was possible to fall into such situation; should not be the case with a recent version of file-storage.