hoodiehq / hoodie-server

:dog: Hapi plugin for Hoodie’s server core module
Apache License 2.0
243 stars 47 forks source link

Random crashes in development environment #57

Closed nnarhinen closed 11 years ago

nnarhinen commented 11 years ago

Sorry about the low amount of detail but hoodie start seems to crash randomly while developing the application. The log is always the same:

Niklas-Narhinen-MacBook-Pro:incus nnarhinen$ hoodie start

> incus@1.0.0 start /Users/nnarhinen/projects/incus
> node node_modules/hoodie-app/lib/hoodie-app.js

Start local couch on port: 6004
CouchDB Started
hoodie server started on port '6003'
setup done

open http://incus.dev in your browser

starting: 'worker-users'
initializing incus worker with: 
{ server: 'http://couch.incus.dev:80',
  admin: { user: 'admin', pass: 'salsa1' },
  persistent_since_storage: false,
  name: 'users' }
[users] [Setup] reading global config from modules/module/appconfig …
All workers started.
Your App is ready now.
[users] [Setup] reading user config from modules/module/users …
[static req] GET /
-> [static req] redirect to index.html
[api req] GET /
[api req] GET /_session
[api req] OPTIONS /user%2Fj2owzdd/_bulk_docs
responding to OPTIONS request
[api req] OPTIONS /user%2Fj2owzdd/_changes?include_docs=true&since=4630&heartbeat=10000&feed=longpoll
responding to OPTIONS request
[api req] POST /user%2Fj2owzdd/_bulk_docs
[api req] POST /user%2Fj2owzdd/_bulk_docs
[api req] POST /user%2Fj2owzdd/_bulk_docs
[api req] POST /user%2Fj2owzdd/_bulk_docs
[static req] GET /favicon.ico
[api req] GET /user%2Fj2owzdd/_changes?include_docs=true&since=4630&heartbeat=10000&feed=longpoll
[api req] POST /user%2Fj2owzdd/_bulk_docs
-> [static req] redirect to index.html
[api req] OPTIONS /user%2Fj2owzdd/_changes?include_docs=true&since=4643&heartbeat=10000&feed=longpoll
responding to OPTIONS request
[api req] GET /user%2Fj2owzdd/_changes?include_docs=true&since=4643&heartbeat=10000&feed=longpoll
[api req] OPTIONS /user%2Fj2owzdd/_changes?include_docs=true&since=4656&heartbeat=10000&feed=longpoll
responding to OPTIONS request
[api req] GET /user%2Fj2owzdd/_changes?include_docs=true&since=4656&heartbeat=10000&feed=longpoll

events.js:71
        throw arguments[1]; // Unhandled 'error' event
                       ^
Error: socket hang up
    at createHangUpError (http.js:1360:15)
    at ServerResponse.OutgoingMessage._writeRaw (http.js:507:26)
    at ServerResponse.OutgoingMessage._send (http.js:476:15)
    at ServerResponse.OutgoingMessage.write (http.js:740:18)
    at ClientRequest.proxyError (/Users/nnarhinen/projects/incus/node_modules/hoodie-app/node_modules/http-proxy/lib/node-http-proxy/http-proxy.js:214:13)
    at ClientRequest.g (events.js:192:14)
    at ClientRequest.EventEmitter.emit (events.js:96:17)
    at Socket.socketCloseListener (http.js:1411:9)
    at Socket.EventEmitter.emit (events.js:126:20)
    at Socket._destroy.destroyed (net.js:358:10)
npm ERR! incus@1.0.0 start: `node node_modules/hoodie-app/lib/hoodie-app.js`
npm ERR! `sh "-c" "node node_modules/hoodie-app/lib/hoodie-app.js"` failed with 1
npm ERR! 
npm ERR! Failed at the incus@1.0.0 start script.
npm ERR! This is most likely a problem with the incus package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node node_modules/hoodie-app/lib/hoodie-app.js
npm ERR! You can get their info via:
npm ERR!     npm owner ls incus
npm ERR! There is likely additional logging output above.

npm ERR! System Darwin 11.4.2
npm ERR! command "/Users/nnarhinen/.nvm/v0.8.20/bin/node" "/Users/nnarhinen/.nvm/v0.8.20/bin/npm" "start"
npm ERR! cwd /Users/nnarhinen/projects/incus
npm ERR! node -v v0.8.20
npm ERR! npm -v 1.2.11
npm ERR! code ELIFECYCLE
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/nnarhinen/projects/incus/npm-debug.log
npm ERR! not ok code 0
nnarhinen commented 11 years ago

couch.stderr contains the following:

/usr/local/Cellar/couchdb/1.2.0/bin/couchdb: line 293: echo: write error: Broken pipe
heart: Wed May  8 21:20:32 2013: Executed "/usr/local/Cellar/couchdb/1.2.0/bin/couchdb -k". Terminating.

heart_beat_kill_pid = 12923
heart_beat_timeout = 11
heart: Sat May 11 08:30:39 2013: heart-beat time-out, no activity for 81 seconds
/usr/local/Cellar/couchdb/1.2.0/bin/couchdb: line 293: echo: write error: Broken pipe
heart: Sat May 11 13:00:02 2013: Executed "/usr/local/Cellar/couchdb/1.2.0/bin/couchdb -k". Terminating.
heart_beat_kill_pid = 34899
heart_beat_timeout = 11
heart: Sat May 11 14:34:02 2013: heart-beat time-out, no activity for 75 seconds
/usr/local/Cellar/couchdb/1.2.0/bin/couchdb: line 293: echo: write error: Broken pipe
heart: Sat May 11 20:13:40 2013: Executed "/usr/local/Cellar/couchdb/1.2.0/bin/couchdb -k". Terminating.
heart_beat_kill_pid = 36708
heart_beat_timeout = 11
heart: Sat May 11 21:47:39 2013: heart-beat time-out, no activity for 76 seconds
/usr/local/Cellar/couchdb/1.2.0/bin/couchdb: line 293: echo: write error: Broken pipe
heart: Sun May 12 17:48:40 2013: Executed "/usr/local/Cellar/couchdb/1.2.0/bin/couchdb -k". Terminating.
heart_beat_kill_pid = 38305
heart_beat_timeout = 11
heart: Sun May 12 17:51:34 2013: heart-beat time-out, no activity for 77 seconds
/usr/local/Cellar/couchdb/1.2.0/bin/couchdb: line 293: echo: write error: Broken pipe
heart: Sun May 12 18:04:55 2013: Executed "/usr/local/Cellar/couchdb/1.2.0/bin/couchdb -k". Terminating.
heart_beat_kill_pid = 38484
heart_beat_timeout = 11
heart: Sun May 12 18:22:30 2013: heart-beat time-out, no activity for 76 seconds
/usr/local/Cellar/couchdb/1.2.0/bin/couchdb: line 293: echo: write error: Broken pipe
heart: Mon May 13 10:29:43 2013: Executed "/usr/local/Cellar/couchdb/1.2.0/bin/couchdb -k". Terminating.
heart_beat_kill_pid = 38727
heart_beat_timeout = 11
caolan commented 11 years ago

Upgrading to node v0.10.x should fix this. On 13 May 2013 19:41, "Niklas Närhinen" notifications@github.com wrote:

couch.stderr contains the following:

/usr/local/Cellar/couchdb/1.2.0/bin/couchdb: line 293: echo: write error: Broken pipe heart: Wed May 8 21:20:32 2013: Executed "/usr/local/Cellar/couchdb/1.2.0/bin/couchdb -k". Terminating.

heart_beat_kill_pid = 12923 heart_beat_timeout = 11 heart: Sat May 11 08:30:39 2013: heart-beat time-out, no activity for 81 seconds /usr/local/Cellar/couchdb/1.2.0/bin/couchdb: line 293: echo: write error: Broken pipe heart: Sat May 11 13:00:02 2013: Executed "/usr/local/Cellar/couchdb/1.2.0/bin/couchdb -k". Terminating. heart_beat_kill_pid = 34899 heart_beat_timeout = 11 heart: Sat May 11 14:34:02 2013: heart-beat time-out, no activity for 75 seconds /usr/local/Cellar/couchdb/1.2.0/bin/couchdb: line 293: echo: write error: Broken pipe heart: Sat May 11 20:13:40 2013: Executed "/usr/local/Cellar/couchdb/1.2.0/bin/couchdb -k". Terminating. heart_beat_kill_pid = 36708 heart_beat_timeout = 11 heart: Sat May 11 21:47:39 2013: heart-beat time-out, no activity for 76 seconds /usr/local/Cellar/couchdb/1.2.0/bin/couchdb: line 293: echo: write error: Broken pipe heart: Sun May 12 17:48:40 2013: Executed "/usr/local/Cellar/couchdb/1.2.0/bin/couchdb -k". Terminating. heart_beat_kill_pid = 38305 heart_beat_timeout = 11 heart: Sun May 12 17:51:34 2013: heart-beat time-out, no activity for 77 seconds /usr/local/Cellar/couchdb/1.2.0/bin/couchdb: line 293: echo: write error: Broken pipe heart: Sun May 12 18:04:55 2013: Executed "/usr/local/Cellar/couchdb/1.2.0/bin/couchdb -k". Terminating. heart_beat_kill_pid = 38484 heart_beat_timeout = 11 heart: Sun May 12 18:22:30 2013: heart-beat time-out, no activity for 76 seconds /usr/local/Cellar/couchdb/1.2.0/bin/couchdb: line 293: echo: write error: Broken pipe heart: Mon May 13 10:29:43 2013: Executed "/usr/local/Cellar/couchdb/1.2.0/bin/couchdb -k". Terminating. heart_beat_kill_pid = 38727 heart_beat_timeout = 11

— Reply to this email directly or view it on GitHubhttps://github.com/hoodiehq/hoodie-app/issues/57#issuecomment-17831845 .

nnarhinen commented 11 years ago

Yes, seems a combination of 0.10 node and 1.3 couchdb makes crashes dissapear. Thanks!