Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Why is `node.js` dying when called from inside python/uwsgi?

Why is `node.js` dying when called from inside python/uwsgi?

Problem

From the shell this python code which start and communicates with a node.js process works fine:

> from subprocess import *
> js = "(function(m) { console.log(m) })('hello world')"
> (out,err) = Popen(["node"], stdin=PIPE, stdout=PIPE, stderr=PIPE, shell=False).communicate(js)
> out
"hello world\n"

But when I run the same code from within uwsgi I instead get this in err:

'FATAL ERROR: v8::Context::New() V8 is no longer usable\n'

Any insights from either the wsgi community or the node.js community? I'm at a loss.

Problem courtesy of: Chris W.

Solution

Check if you are running uWSGI with memory constraints (like --limit-as or a cgroup/jail). Processes spawned from it will inherit those limits. Even check for environment variables v8 could expect (like HOME)

Solution courtesy of: roberto

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Why is `node.js` dying when called from inside python/uwsgi?

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×