Node.js crashes while servicing a video file

I serve static video files (.ogv and .mov) with the node.js and video.js plugin. However, node.js continues to crash with the error message:

node: ../deps/uv/src/unix/stream.c:1319: uv_read_stop: Assertion `!uv__io_active(&stream->io_watcher, 4) || !(&stream->write_completed_queue == (&stream->write_completed_queue)->prev) || !(&stream->write_queue == (&stream->write_queue)->prev) || stream->shutdown_req != ((void *)0) || stream->connect_req != ((void *)0)' failed. 

This is the node.js code:

 app.configure (function () { app.set ('views', path.join (__dirname, 'templates')); app.set ('view engine', 'jade'); app.use (express.favicon (path.join (__dirname, '/img/favicon.ico'))); app.use ('/video', express.static (path.join (__dirname, 'public'))); app.use (express.static (path.join (__dirname, 'public'))); //bodyParser, methodOverride, cookieParser and session calls here app.use (app.router); }); 

my node.js version v0.10.4 "

Directory structure:

  • / MYAPP
    • / MYAPP / public
      • / MYAPP / open / video

Pretty simple static file. Tried placing express.static after app.router and above the mark, there is no such luck.

Please rate any recommendations.

+4
source share
1 answer

So, for the sake of completeness: this is a known bug in libuv , which was resolved from 0.10.9 . There was a similar problem that was fixed as of 0.10.11 .

+1
source

Source: https://habr.com/ru/post/1482924/


All Articles