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

tornado 5.0+ not compatible with gunicorn #1728

Closed
xyoun opened this issue Mar 20, 2018 · 3 comments
Closed

tornado 5.0+ not compatible with gunicorn #1728

xyoun opened this issue Mar 20, 2018 · 3 comments

Comments

@xyoun
Copy link

xyoun commented Mar 20, 2018

gunicorn version: 19.7.1
tornado: 5.0

failed with:

$ ./bin/gunicorn -w 1 -t 300 -k tornado web:app -b 0.0.0.0:9003
[2018-03-20 14:17:29 +0000] [28600] [INFO] Starting gunicorn 19.7.1
[2018-03-20 14:17:29 +0000] [28600] [INFO] Listening at: http://0.0.0.0:9003 (28600)
[2018-03-20 14:17:29 +0000] [28600] [INFO] Using worker: tornado
[2018-03-20 14:17:29 +0000] [28605] [INFO] Booting worker with pid: 28605
[2018-03-20 14:17:29 +0000] [28605] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/data/data/pkgs/nginxgw/nginxgw-45-838b8953/.buildout/eggs/gunicorn-19.7.1-py2.py3-none-any.ovo/gunicorn/arbiter.py", line 578, in spawn_worker
    worker.init_process()
  File "/data/data/pkgs/nginxgw/nginxgw-45-838b8953/.buildout/eggs/gunicorn-19.7.1-py2.py3-none-any.ovo/gunicorn/workers/base.py", line 131, in init_process
    self.run()
  File "/data/data/pkgs/nginxgw/nginxgw-45-838b8953/.buildout/eggs/gunicorn-19.7.1-py2.py3-none-any.ovo/gunicorn/workers/gtornado.py", line 70, in run
    PeriodicCallback(self.watchdog, 1000, io_loop=self.ioloop).start()
TypeError: __init__() got an unexpected keyword argument 'io_loop'
[2018-03-20 14:17:29 +0000] [28605] [INFO] Worker exiting (pid: 28605)
[2018-03-20 14:17:29 +0000] [28608] [INFO] Booting worker with pid: 28608
[2018-03-20 14:17:29 +0000] [28608] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/data/data/pkgs/nginxgw/nginxgw-45-838b8953/.buildout/eggs/gunicorn-19.7.1-py2.py3-none-any.ovo/gunicorn/arbiter.py", line 578, in spawn_worker
    worker.init_process()
  File "/data/data/pkgs/nginxgw/nginxgw-45-838b8953/.buildout/eggs/gunicorn-19.7.1-py2.py3-none-any.ovo/gunicorn/workers/base.py", line 131, in init_process
    self.run()
  File "/data/data/pkgs/nginxgw/nginxgw-45-838b8953/.buildout/eggs/gunicorn-19.7.1-py2.py3-none-any.ovo/gunicorn/workers/gtornado.py", line 70, in run
    PeriodicCallback(self.watchdog, 1000, io_loop=self.ioloop).start()
TypeError: __init__() got an unexpected keyword argument 'io_loop'

according to the release note of Tornado 5.0:

io_loop arguments to many Tornado functions have been removed. Use IOLoop.current() instead of passing IOLoop objects explicitly.

http://www.tornadoweb.org/en/stable/releases/v5.0.0.html#backwards-compatibility-notes

@castrapel
Copy link

I'm seeing this too.

@tilgovi
Copy link
Collaborator

tilgovi commented Mar 29, 2018

If anyone can make a PR I'd be happy to review it.

@alviezhang
Copy link
Contributor

@tilgovi I opened a pull request to fix this issue. #1752

tilgovi added a commit that referenced this issue Apr 25, 2018
Fix #1728 make TornadoWorker compatible with Tornado 5.X
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants