
Originally Posted by
IcedTivo
I'm getting this error frequently almost daily. [...] restart/full often works to fix but sometimes have to reboot.
-------INTERNAL SERVER ERROR------ --cut here--POSIX EMFILE {too many open files}
couldn't open "/TivoWebPlus/themes/.common.css": too many open files
while executing
"open $fnam "r""
(procedure "serve_file" line 31)
invoked from: "serve_file $chan $path $env $ext $head_req $mod_since"
(procedure "doSession" line 100)
invoked from: "doSession $chan $addr $port"
--cut here--
TiVo (well my Series 1 at least!) can only handle ('scuse the pun
) 256 open files.
There's a bug in the TWP file server (serve_file{}) which means it opens file handles but doesn't always close them again (e.g. when replying with a 304).
The fix for this is to modify libs/http.itcl as follows:
Code:
--- S:/tivowebplus-v2.1.b3-110622/TivoWebPlus/libs/http.itcl Tue Jun 21 22:59:12 2011
+++ T:/tivowebplus-v2.1.b3-110622/TivoWebPlus/libs/http.itcl Sat Jul 21 13:39:40 2012
@@ -135,9 +135,9 @@
}
} } ] { return 404 }
}
- if { $mod_since == $moddate } { return 304 }
+ if { $mod_since == $moddate } { catch {close $fd}; return 304 }
print_html_header_200 $chan $mime $moddate
- if { $head_req == 1 } { return 0 }
+ if { $head_req == 1 } { catch {close $fd}; return 0 }
if { $image } {
fconfigure $chan -translation binary
}