Results 1 to 15 of 1264

Thread: TivoWebPlus 2.1 Testing and Development

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #10
    Join Date
    Dec 2006
    Posts
    57

    Fix for "too many open files"

    Quote Originally Posted by IcedTivo View Post
    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
       }
    Attached Files Attached Files
    Tivo since 2002. UK S1 + 1TB SATA. ex-TAM (tenner a month). Virgin Media not available here.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •