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

GunicornWebWorker: Support for unix domain sockets #470

Closed
devoto13 opened this issue Aug 19, 2015 · 3 comments
Closed

GunicornWebWorker: Support for unix domain sockets #470

devoto13 opened this issue Aug 19, 2015 · 3 comments
Labels
Milestone

Comments

@devoto13
Copy link

At the moment GunicornWebWorker doesn't support unix domain sockets. I think it can be fixed by checking for socket type and not setting host and port for unix domain sockets. Something like:

    @asyncio.coroutine
    def _run(self):
        for sock in self.sockets:
            if isinstance(sock, gunicorn.sock.UnixSocket):
                handler = self.make_handler(self.wsgi, "", 0)
            else:
                handler = self.make_handler(self.wsgi, *sock.cfg_addr)
            srv = yield from self.loop.create_server(handler, sock=sock.sock)
            self.servers[srv] = handler

        ...

From other side I am really not sure, why does ServerHttpProtocol contains host and port. They are not used and probably not needed. So better solution would probably be to remove them completely. But it will break backwards compatibility though.

If you think either of this solutions is fine, let me know and I'll provide a pull request.


As a side question I want to ask why does aiohttp has it's own worker instead of being compatible with the WSGI spec and Gunicorn's gaiohttp worker? I found this comment, but it was never answered...

@fafhrd91
Copy link
Member

originally i wrote wsgi compatible gunicorn worker. right now i do not have enough time to unify both workers and submit to gunicorn repo.

@asvetlov asvetlov added this to the 0.21 milestone Jan 29, 2016
@asvetlov
Copy link
Member

Fixed by 1ac5e26

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants