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

Apache 2.4.7 throws error 502 when uWSGI returns 401 with mod_uwsgi_proxy #835

Open
islavov opened this issue Feb 9, 2015 · 5 comments
Open

Comments

@islavov
Copy link

islavov commented Feb 9, 2015

Using mod_uwsgi_proxy, I start getting error 502 and I can clearly see that uWSGI returned 401.
This starts to occur after a couple of successfully returned 401 responses. After that, no 401 reaches the web browser. I get this from apache.

The proxy server received an invalid response from an upstream server.

I use this in my apache conf
ProxyPass /pyresp uwsgi://127.0.0.1:3051/ timeout=600

And this is my uwsgi conf

[uwsgi]
env = HOME=/home/ubuntu
socket = 127.0.0.1:3051
chdir = /home/ubuntu
module = pyrespweb.web:app
pythonpath = /home/ubuntu/pyresp
master=True
processes = 4
buffer-size=32768
venv = /home/ubuntu/.virtualenvs/pyresp
uid = ubuntu
gid = ubuntu

Nothing special as you can see

I will be happy to provide as much info as needed, but currently I have no what to look for.
This issues is not observed with mod_uwsgi.

@unbit
Copy link
Owner

unbit commented Feb 10, 2015

You mean that when your app returns 401, Apache returns 502 for those requests ? Or it start returning 502 for every kind of request after a bunch of 401 ?

@islavov
Copy link
Author

islavov commented Feb 10, 2015

After a bunch of requests, it starts returning 502 only for 401s. Other requests are fine.

@unbit
Copy link
Owner

unbit commented Feb 10, 2015

Ok, and nothing in apache error log ?

@islavov
Copy link
Author

islavov commented Feb 10, 2015

Nothing related.

@unbit
Copy link
Owner

unbit commented Feb 13, 2015

Can you check if using mod_proxy_http + --http-socket instead of mod_proxy_uwsgi + --socket has the same behaviour ?

Thanks

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

3 participants