最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【暂未解决】supervisorctl去运行Flask但出错:EOFError: EOF read where object expected

Flask crifan 5965浏览 0评论
(RunningFast) ➜  staging supervisorctl -c supervisor.conf restart runningfast_staging
runningfast_staging: ERROR (not running)
runningfast_staging: started

结果:

<div–<——————————————————————————
[2016-12-28 11:02:01 +0000] [10171] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/root/Envs/RunningFast/lib/python2.7/site-packages/gunicorn/arbiter.py", line 557, in spawn_worker
    worker.init_process()
  File "/root/Envs/RunningFast/lib/python2.7/site-packages/gunicorn/workers/ggevent.py", line 190, in init_process
    super(GeventWorker, self).init_process()
  File "/root/Envs/RunningFast/lib/python2.7/site-packages/gunicorn/workers/base.py", line 126, in init_process
    self.load_wsgi()
  File "/root/Envs/RunningFast/lib/python2.7/site-packages/gunicorn/workers/base.py", line 136, in load_wsgi
    self.wsgi = self.app.wsgi()
  File "/root/Envs/RunningFast/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi
    self.callable = self.load()
  File "/root/Envs/RunningFast/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load
    return self.load_wsgiapp()
  File "/root/Envs/RunningFast/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp
    return util.import_app(self.app_uri)
  File "/root/Envs/RunningFast/lib/python2.7/site-packages/gunicorn/util.py", line 357, in import_app
    __import__(module)
  File "/root/Envs/RunningFast/lib/python2.7/site-packages/gevent/builtins.py", line 93, in __import__
    result = _import(*args, **kwargs)
  File "/root/RunningFast/staging/run.py", line 4, in <module>
    from runningfast.app import app
  File "/root/Envs/RunningFast/lib/python2.7/site-packages/gevent/builtins.py", line 93, in __import__
    result = _import(*args, **kwargs)
  File "/root/RunningFast/staging/runningfast/app.py", line 143, in <module>
    from runningfast.resources.Accesstoken import *
  File "/root/Envs/RunningFast/lib/python2.7/site-packages/gevent/builtins.py", line 93, in __import__
    result = _import(*args, **kwargs)
  File "/root/RunningFast/staging/runningfast/resources/Accesstoken.py", line 11, in <module>
    from runningfast.common.utils import *
  File "/root/Envs/RunningFast/lib/python2.7/site-packages/gevent/builtins.py", line 93, in __import__
    result = _import(*args, **kwargs)
EOFError: EOF read where object expected
[2016-12-28 11:02:01 +0000] [10171] [INFO] Worker exiting (pid: 10171)
[2016-12-28 11:02:01 +0000] [10158] [INFO] Shutting down: Master
[2016-12-28 11:02:01 +0000] [10158] [INFO] Reason: Worker failed to boot.

注:

1.之前一直正常的。

最近不知道什么原因

2.对于:

EOFError: EOF read where object expected

这个问题,之前也是遇到过很多次,但是都是没有找到问题根本原因。

搜:

Flask EOFError: EOF read where object expected

supervisorctl EOFError: EOF read where object expected

gevent EOFError: EOF read where object expected

Issue 11776 – googleappengine – EOFError: EOF read where object expected – Google App Engine – Google Project Hosting

只能靠重启服务解决。

google app engine – EOFError: EOF read where object expected – Stack Overflow

【总结】

后来还是

重新覆盖代码,重新部署Flask的代码,重启Flask的app

暂时解决了问题。

但是还是没有找到问题根本原因。

转载请注明:在路上 » 【暂未解决】supervisorctl去运行Flask但出错:EOFError: EOF read where object expected

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
89 queries in 0.233 seconds, using 22.12MB memory