【发布时间】:2012-03-15 17:40:04
【问题描述】:
从 shell 这个python 代码启动并与node.js 进程通信工作正常:
> 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"
但是当我从 uwsgi 中运行相同的代码时,我会在 err 中得到这个:
'FATAL ERROR: v8::Context::New() V8 is no longer usable\n'
来自wsgi 社区或node.js 社区的任何见解?我很茫然。
【问题讨论】:
-
@LinusGThiel 我还没有尝试过更改 uwsgi 设置,但是基于 python 的建议使用
close_fds=True调用Popen不起作用
标签: python node.js wsgi uwsgi subprocess