Search code examples
rikulo

Rikulo-Stream crashes daily with -"SocketException: OS Error: Broken pipe, errno = 32"


I have a simple web app (http://www.webdungeon2.org) (6 pages) running on the latest (April 2014) version of Rikulo Stream (Ubuntu 13.04), Dart 1.2 and I get the following error when browsing (i think):

Uncaught Error: SocketException: OS Error: Broken pipe, errno = 32, address = 0.0.0.0, port = 80
Unhandled exception:
SocketException: OS Error: Broken pipe, errno = 32, address = 0.0.0.0, port = 80
#0      _rootHandleUncaughtError.<anonymous closure>.<anonymous closure> (dart:async/zone.dart:700)
#1      _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#2      _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#3      _asyncRunCallback (dart:async/schedule_microtask.dart:36)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:119)

The server crashes and then I restart it. This has happened 3 times in 3 days.

I also get these (which do NOT crash the site):

2014-04-09 15:07:33.394:stream:5
SHOUT: [/MY_WEB_PAGE] HttpException: Trying to set 'Transfer-Encoding: Chunked' on HTTP 1.0 headers
#0      _HttpHeaders.chunkedTransferEncoding= (http_headers.dart:142)
#1      Rsp.init (package:stream/src/rsp_util.dart:25:15)
#2      demo (file:///mytool/webdungeon/web/webapp/demo.rsp.dart:10:16)
#3      _StreamServer._handle (package:stream/src/server_impl.dart:92:39)
#4      _StreamServer._startChannel.<anonymous closure>.<anonymous closure> (package:stream/src/server_impl.dart:310:16)
#5      _rootRunUnary (dart:async/zone.dart:717)
#6      _ZoneDelegate.runUnary (dart:async/zone.dart:449)
#7      _CustomizedZone.runUnary (dart:async/zone.dart:654)
#8      _BaseZone.runUnaryGuarded (dart:async/zone.dart:569)
......
......

Any suggestions?

UPDATE - 12 April

Problem still occurs on Dart 1.3, but error code is different

Uncaught Error: SocketException: OS Error: Connection reset by peer, errno = 104, address = 0.0.0.0, port = 80
Unhandled exception:
SocketException: OS Error: Connection reset by peer, errno = 104, address = 0.0.0.0, port = 80
#0      _rootHandleUncaughtError.<anonymous closure>.<anonymous closure> (dart:async/zone.dart:713)
#1      _asyncRunCallbackLoop (dart:async/schedule_microtask.dart:23)
#2      _asyncRunCallback (dart:async/schedule_microtask.dart:32)
#3      _asyncRunCallback (dart:async/schedule_microtask.dart:36)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:119)

Serge

UPDATE - 28 April

The problem seems to have been resolved in Dart SDK version 1.3.3. My server has been running for 2 days without a hitch.

Serge


Solution

  • Did you upgrade to Dart 1.3? The problem shall be caused by Issue 17468, and it was fixed in Dart 1.3.

    For the issue of HttpException...Chunked, I don't have the experience of it. You have to check Dart API, or make a simple case to reproduce the issue.