Sanic: Signals breaking gunicorn worker

Created on 21 Apr 2017  路  4Comments  路  Source: sanic-org/sanic

From some testing at the current state of master (6ce0050979ba50c0115d175427b911fc4ccfed8f), starting at commit df914a92e40cd03dbf37a7ca7d6929d380b1a585, the gunicorn worker in worker.py appears to be broken. Error message is below:

Traceback (most recent call last):
  File "/home/gregm/.pyenv/versions/3.6.1/lib/python3.6/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker
    worker.init_process()
  File "/home/gregm/.pyenv/versions/3.6.1/lib/python3.6/site-packages/sanic/worker.py", line 40, in init_process
    super().init_process()
  File "/home/gregm/.pyenv/versions/3.6.1/lib/python3.6/site-packages/gunicorn/workers/base.py", line 131, in init_process
    self.run()
  File "/home/gregm/.pyenv/versions/3.6.1/lib/python3.6/site-packages/sanic/worker.py", line 62, in run
    self.loop.run_until_complete(self._runner)
  File "uvloop/loop.pyx", line 1203, in uvloop.loop.Loop.run_until_complete (uvloop/loop.c:25632)
  File "/home/gregm/.pyenv/versions/3.6.1/lib/python3.6/site-packages/sanic/worker.py", line 101, in _run
    **self._server_settings
TypeError: serve() got multiple values for keyword argument 'signal'

The error appears to be that app._helper started supplying a 'signal' key and so does the gunicorn worker.

Most helpful comment

We should add a simple integration test for Gunicorn worker.

All 4 comments

We should add a simple integration test for Gunicorn worker.

I'm fixing this right now and we'll have it out as a new patch shortly

Closing per #655.

Agreed we should add an integration test...

Was this page helpful?
0 / 5 - 0 ratings