Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS process timed out. #3

Open
mikeal opened this issue Jun 20, 2013 · 9 comments
Open

OS process timed out. #3

mikeal opened this issue Jun 20, 2013 · 9 comments

Comments

@mikeal
Copy link

mikeal commented Jun 20, 2013

I can't seem to get this working.

I'm on SmartOS. Keep getting this all over my couch log:

[Thu, 20 Jun 2013 18:21:21 GMT] [error] [<0.867.0>] OS Process Error <0.891.0> :: {os_process_error,
"OS process timed out."}
[Thu, 20 Jun 2013 18:21:25 GMT] [error] [<0.842.0>] OS Process Error <0.897.0> :: {os_process_error,
"OS process timed out."}

@carpogoryanin
Copy link

Hello. I have the same problem on Ubuntu 14.04 (node.js 0.10.29).
Top shows that processes with couchjs are restarting all the time, when I try run some view.
May be exist some solutions? I find nothing about this in google.
Thanks.

@jhs
Copy link
Member

jhs commented Jul 30, 2014

Thanks. Does the test suite run?

@carpogoryanin
Copy link

Test output (test/experiment.js):

Hit SIGUSR1 - starting debugger agent.
debugger listening on port 5859
Doing stuff: 0
More stuff: 0
Test vm
Run vm now
Result:
{ _idleTimeout: 1000,
  _idlePrev: 
   { _idleNext: [Circular],
     _idlePrev: [Circular],
     msecs: 1000,
     ontimeout: [Function: listOnTimeout] },
  _idleNext: 
   { _idleNext: [Circular],
     _idlePrev: [Circular],
     msecs: 1000,
     ontimeout: [Function: listOnTimeout] },
  _when: 1406737367189,
  _onTimeout: [Function: hello],
  _idleStart: 1406737366190 }
Hello: 10
Hello: 9
Hello: 8
Hello: 7
Hello: 6
Hello: 5
Hello: 4
Hello: 3
Hello: 2
Hello: 1

@JKDingwall
Copy link

In cli.js I added (a move will probably do)

process.stdin.resume()

at line 60 such that block of code looks like:

process.stdin.resume()
process.stdin.setEncoding('utf8')
process.stdin.pipe(stdin)
process.stdin.resume()

The clue was in creating the log file in /tmp (touch /tmp/couchjs.log) which collected a message similar to "Error: Cannot switch to old mode now."

@jhs
Copy link
Member

jhs commented Jun 3, 2015

Oh, thanks!

@jhs
Copy link
Member

jhs commented Jun 3, 2015

@JKDingwall I am not 100% sure I see where you added that code? Would you mind making a PR, or just a link to the source you are referring to would be sufficient.

I am looking at line 60 here: https://github.com/iriscouch/couchjs/blob/master/cli.js#L60

(Another problem that I often have is that I push lots of code to GitHub and forget to npm publish. Might that be it?)

@JKDingwall
Copy link

From my npm install -g couchjs I seem to have got a version of cli.js at 5a438de but that does not include process.stdin.resume() at all so I'm not sure where that came from. I will try an install of couchjs with npm install <git:// url> and report my experiences against that.

@jhs
Copy link
Member

jhs commented Jun 4, 2015

Thank you very much. I am eager to hear your results.

@brailateo
Copy link

The same error for me, I did a fresh

sudo npm -g install git://github.com/iriscouch/couchjs

on a Linux machine, Ubuntu 15.10 with CouchDB 1.6.0, got another cli.js without resume() at line 62 but nodejs views are still crashing the server:

root@teo-Home:/var/log/couchdb# node -v
v0.10.25
root@teo-Home:/var/log/couchdb# tail couch.log
[Sun, 20 Mar 2016 08:55:34 GMT] [debug] [<0.95.0>] Linked process died abnormally: <0.13034.0> (reason: {badarg,
     [{erlang,
       port_command,
       [#Port<0.11269>,
        [<<"[\"reset\",{\"reduce_limit\":true,\"timeout\":5000}]">>,
         10]],
       []},
      {couch_os_process,
       writejson,
       2,
       [{file,
         "couch_os_process.erl"},
        {line,
         93}]},
      {couch_os_process,
       handle_call,
       3,
       [{file,
         "couch_os_process.erl"},
        {line,
         183}]},
      {gen_server,
       handle_msg,
       5,
       [{file,
         "gen_server.erl"},
        {line,
         580}]},
      {proc_lib,
       init_p_do_apply,
       3,
       [{file,
         "proc_lib.erl"},
        {line,
         237}]}]})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants